mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 08:39:17 +00:00
Remove unnecessary name parameter.
This commit is contained in:
@@ -10,10 +10,9 @@ BONES = {}
|
|||||||
|
|
||||||
# Represents a bone with a name, id, and experience.
|
# Represents a bone with a name, id, and experience.
|
||||||
class Bone
|
class Bone
|
||||||
attr_reader :name, :id, :exp
|
attr_reader :id, :exp
|
||||||
|
|
||||||
def initialize(name, id, exp)
|
def initialize(id, exp)
|
||||||
@name = name
|
|
||||||
@id = id
|
@id = id
|
||||||
@exp = exp
|
@exp = exp
|
||||||
end
|
end
|
||||||
@@ -58,7 +57,7 @@ end
|
|||||||
# Appends a bone to the array
|
# Appends a bone to the array
|
||||||
def append_bone(hash)
|
def append_bone(hash)
|
||||||
raise 'Hash must contain an id and an experience value.' unless hash.has_key?(:id) && hash.has_key?(:experience)
|
raise 'Hash must contain an id and an experience value.' unless hash.has_key?(:id) && hash.has_key?(:experience)
|
||||||
name = hash[:name], id = hash[:id], experience = hash[:experience]
|
id = hash[:id], experience = hash[:experience]
|
||||||
|
|
||||||
BONES[id] = Bone.new(name, id, experience)
|
BONES[id] = Bone.new(name, id, experience)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user