Class: Tiltify::Challenge
- Defined in:
- lib/tiltify/objects/challenge.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Challenge
constructor
A new instance of Challenge.
Methods inherited from Object
Constructor Details
#initialize(options = {}) ⇒ Challenge
Returns a new instance of Challenge.
4 5 6 7 8 9 10 |
# File 'lib/tiltify/objects/challenge.rb', line 4 def initialize( = {}) super 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 |