Class: Tiltify::Reward
- Defined in:
- lib/tiltify/objects/reward.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Reward
constructor
A new instance of Reward.
Methods inherited from Object
Constructor Details
#initialize(options = {}) ⇒ Reward
Returns a new instance of Reward.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/tiltify/objects/reward.rb', line 4 def initialize( = {}) super self.retired_at = Time.at(["retiredAt"].to_s[0..-4].to_i) if ["retiredAt"] self.activated_at = Time.at(["activatedAt"].to_s[0..-4].to_i) if ["activatedAt"] self.deactivated_at = Time.at(["deactivatedAt"].to_s[0..-4].to_i) if ["deactivatedAt"] self.ends_at = Time.at(["endsAt"].to_s[0..-4].to_i) if ["endsAt"] self.created_at = Time.at(["createdAt"].to_s[0..-4].to_i) if ["createdAt"] self.updated_at = Time.at(["updatedAt"].to_s[0..-4].to_i) if ["updatedAt"] end |