Class: IActionable::Objects::LeaderboardReport
- Inherits:
-
IActionableObject
- Object
- IActionableObject
- IActionable::Objects::LeaderboardReport
- Defined in:
- lib/iactionable/objects/leaderboard_report.rb
Instance Attribute Summary collapse
-
#leaderboard ⇒ Object
Returns the value of attribute leaderboard.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#page_number ⇒ Object
Returns the value of attribute page_number.
-
#point_type ⇒ Object
Returns the value of attribute point_type.
-
#profiles ⇒ Object
Returns the value of attribute profiles.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
Instance Method Summary collapse
-
#initialize(key_values = {}) ⇒ LeaderboardReport
constructor
A new instance of LeaderboardReport.
- #to_hash ⇒ Object
Methods inherited from IActionableObject
timestamp_regexp, timestamp_to_seconds
Constructor Details
#initialize(key_values = {}) ⇒ LeaderboardReport
Returns a new instance of LeaderboardReport.
11 12 13 14 15 16 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 11 def initialize(key_values={}) @leaderboard = IActionable::Objects::PointType.new(key_values.delete("Leaderboard")) @point_type = IActionable::Objects::PointType.new(key_values.delete("PointType")) @profiles = extract_many_as(key_values, "Profiles", IActionable::Objects::ProfileSummary) super(key_values) end |
Instance Attribute Details
#leaderboard ⇒ Object
Returns the value of attribute leaderboard.
7 8 9 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 7 def leaderboard @leaderboard end |
#page_count ⇒ Object
Returns the value of attribute page_count.
4 5 6 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 4 def page_count @page_count end |
#page_number ⇒ Object
Returns the value of attribute page_number.
5 6 7 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 5 def page_number @page_number end |
#point_type ⇒ Object
Returns the value of attribute point_type.
8 9 10 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 8 def point_type @point_type end |
#profiles ⇒ Object
Returns the value of attribute profiles.
9 10 11 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 9 def profiles @profiles end |
#total_count ⇒ Object
Returns the value of attribute total_count.
6 7 8 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 6 def total_count @total_count end |
Instance Method Details
#to_hash ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/iactionable/objects/leaderboard_report.rb', line 18 def to_hash { "PageCount" => @page_count, "PageNumber" => @page_number, "TotalCount" => @total_count, "Leaderboard" => @leaderboard.to_hash, "PointType" => @point_type.to_hash, "Profiles" => @profiles.map{|profile| profile.to_hash} } end |