Class: GodvilleKit::Equipment
- Inherits:
-
Object
- Object
- GodvilleKit::Equipment
- Defined in:
- lib/godville_kit/equipment.rb
Instance Attribute Summary collapse
-
#arms ⇒ Object
readonly
Returns the value of attribute arms.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#legs ⇒ Object
readonly
Returns the value of attribute legs.
-
#shield ⇒ Object
readonly
Returns the value of attribute shield.
-
#tailsman ⇒ Object
readonly
Returns the value of attribute tailsman.
-
#weapon ⇒ Object
readonly
Returns the value of attribute weapon.
Instance Method Summary collapse
-
#initialize(raw_equipment_data) ⇒ Equipment
constructor
A new instance of Equipment.
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
#arms ⇒ Object (readonly)
Returns the value of attribute arms.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def arms @arms end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def body @body end |
#head ⇒ Object (readonly)
Returns the value of attribute head.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def head @head end |
#legs ⇒ Object (readonly)
Returns the value of attribute legs.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def legs @legs end |
#shield ⇒ Object (readonly)
Returns the value of attribute shield.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def shield @shield end |
#tailsman ⇒ Object (readonly)
Returns the value of attribute tailsman.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def tailsman @tailsman end |
#weapon ⇒ Object (readonly)
Returns the value of attribute weapon.
3 4 5 |
# File 'lib/godville_kit/equipment.rb', line 3 def weapon @weapon end |