Class: IActionable::Objects::Level
- Inherits:
-
IActionableObject
- Object
- IActionableObject
- IActionable::Objects::Level
- Defined in:
- lib/iactionable/objects/level.rb
Instance Attribute Summary collapse
-
#level_type ⇒ Object
Returns the value of attribute level_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#required_points ⇒ Object
Returns the value of attribute required_points.
Instance Method Summary collapse
-
#initialize(key_values = {}) ⇒ Level
constructor
A new instance of Level.
- #to_hash ⇒ Object
Methods inherited from IActionableObject
timestamp_regexp, timestamp_to_seconds
Constructor Details
#initialize(key_values = {}) ⇒ Level
Returns a new instance of Level.
9 10 11 12 |
# File 'lib/iactionable/objects/level.rb', line 9 def initialize(key_values={}) @level_type = IActionable::Objects::LevelType.new(key_values.delete("LevelType")) super(key_values) end |
Instance Attribute Details
#level_type ⇒ Object
Returns the value of attribute level_type.
7 8 9 |
# File 'lib/iactionable/objects/level.rb', line 7 def level_type @level_type end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/iactionable/objects/level.rb', line 4 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
5 6 7 |
# File 'lib/iactionable/objects/level.rb', line 5 def number @number end |
#required_points ⇒ Object
Returns the value of attribute required_points.
6 7 8 |
# File 'lib/iactionable/objects/level.rb', line 6 def required_points @required_points end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/iactionable/objects/level.rb', line 14 def to_hash { "Name" => @name, "Number" => @number, "RequiredPoints" => @required_points, "LevelType" => @level_type.to_hash } end |