Class: IActionable::Objects::ProfileLevel
- Inherits:
-
IActionableObject
- Object
- IActionableObject
- IActionable::Objects::ProfileLevel
- Defined in:
- lib/iactionable/objects/profile_level.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
Returns the value of attribute current.
-
#next ⇒ Object
Returns the value of attribute next.
Instance Method Summary collapse
-
#initialize(key_values = {}) ⇒ ProfileLevel
constructor
A new instance of ProfileLevel.
- #to_hash ⇒ Object
Methods inherited from IActionableObject
timestamp_regexp, timestamp_to_seconds
Constructor Details
#initialize(key_values = {}) ⇒ ProfileLevel
Returns a new instance of ProfileLevel.
7 8 9 10 |
# File 'lib/iactionable/objects/profile_level.rb', line 7 def initialize(key_values={}) @current = IActionable::Objects::Level.new(key_values.delete("Current")) unless key_values["Current"].blank? @next = IActionable::Objects::Level.new(key_values.delete("Next")) unless key_values["Next"].blank? end |
Instance Attribute Details
#current ⇒ Object
Returns the value of attribute current.
4 5 6 |
# File 'lib/iactionable/objects/profile_level.rb', line 4 def current @current end |
#next ⇒ Object
Returns the value of attribute next.
5 6 7 |
# File 'lib/iactionable/objects/profile_level.rb', line 5 def next @next end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 17 |
# File 'lib/iactionable/objects/profile_level.rb', line 12 def to_hash { "Current" => @current.to_hash, "Next" => @next.to_hash } end |