Class: IActionable::Objects::IActionableObject
- Inherits:
-
Object
- Object
- IActionable::Objects::IActionableObject
- Defined in:
- lib/iactionable/objects/i_actionable_object.rb
Direct Known Subclasses
Achievement, Challenge, Goal, Identifier, Leaderboard, LeaderboardReport, Level, LevelType, PointType, ProfileAchievements, ProfileChallenges, ProfileGoals, ProfileLevel, ProfileNotifications, ProfilePoints, ProfileSummary, Progress
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key_values = {}) ⇒ IActionableObject
constructor
A new instance of IActionableObject.
Constructor Details
#initialize(key_values = {}) ⇒ IActionableObject
Returns a new instance of IActionableObject.
4 5 6 7 8 |
# File 'lib/iactionable/objects/i_actionable_object.rb', line 4 def initialize(key_values={}) key_values.each_pair do |key, value| instance_variable_set "@#{key.camelize.underscore}".to_sym, value end end |
Class Method Details
.timestamp_regexp ⇒ Object
10 11 12 |
# File 'lib/iactionable/objects/i_actionable_object.rb', line 10 def self. /\/Date\((\d+)((\-|\+)\d{4})\)\// end |
.timestamp_to_seconds(timestamp) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/iactionable/objects/i_actionable_object.rb', line 14 def self.() milliseconds = [, 1] tz = [, 2] unless milliseconds.nil? || tz.nil? "#{Integer(milliseconds)/1000}#{tz}" else nil end end |