Class: Clashinator::Army
- Inherits:
-
Object
- Object
- Clashinator::Army
- Defined in:
- lib/clashinator/army.rb
Overview
This class represents the army model through the player model
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
-
#max_level ⇒ Object
Returns the value of attribute max_level.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Army
constructor
A new instance of Army.
Constructor Details
#initialize(attributes) ⇒ Army
Returns a new instance of Army.
7 8 9 10 11 |
# File 'lib/clashinator/army.rb', line 7 def initialize(attributes) @name = attributes['name'] @level = attributes['level'] @max_level = attributes['maxLevel'] end |
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level.
5 6 7 |
# File 'lib/clashinator/army.rb', line 5 def level @level end |
#max_level ⇒ Object
Returns the value of attribute max_level.
5 6 7 |
# File 'lib/clashinator/army.rb', line 5 def max_level @max_level end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/clashinator/army.rb', line 5 def name @name end |