Class: IActionable::Objects::ProfileLevel

Inherits:
IActionableObject show all
Defined in:
lib/iactionable/objects/profile_level.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#currentObject

Returns the value of attribute current.



4
5
6
# File 'lib/iactionable/objects/profile_level.rb', line 4

def current
  @current
end

#nextObject

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_hashObject



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