Class: GodvilleKit::Equipment

Inherits:
Object
  • Object
show all
Defined in:
lib/godville_kit/equipment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_equipment_data) ⇒ Equipment

Returns a new instance of Equipment.



11
12
13
14
15
16
17
18
19
# File 'lib/godville_kit/equipment.rb', line 11

def initialize(raw_equipment_data)
  @weapon = GodvilleKit::Gear.new(raw_equipment_data['weapon'])
  @shield = GodvilleKit::Gear.new(raw_equipment_data['shield'])
  @head = GodvilleKit::Gear.new(raw_equipment_data['head'])
  @body = GodvilleKit::Gear.new(raw_equipment_data['body'])
  @arms = GodvilleKit::Gear.new(raw_equipment_data['arms'])
  @legs = GodvilleKit::Gear.new(raw_equipment_data['legs'])
  @talisman = GodvilleKit::Gear.new(raw_equipment_data['talisman'])
end

Instance Attribute Details

#armsObject (readonly)

Returns the value of attribute arms.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def arms
  @arms
end

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def body
  @body
end

#headObject (readonly)

Returns the value of attribute head.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def head
  @head
end

#legsObject (readonly)

Returns the value of attribute legs.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def legs
  @legs
end

#shieldObject (readonly)

Returns the value of attribute shield.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def shield
  @shield
end

#tailsmanObject (readonly)

Returns the value of attribute tailsman.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def tailsman
  @tailsman
end

#weaponObject (readonly)

Returns the value of attribute weapon.



3
4
5
# File 'lib/godville_kit/equipment.rb', line 3

def weapon
  @weapon
end