Class: Countdowner::Datetime
- Inherits:
-
Object
- Object
- Countdowner::Datetime
- Defined in:
- lib/countdowner/datetime.rb
Instance Method Summary collapse
-
#initialize(time) ⇒ Datetime
constructor
A new instance of Datetime.
- #iso ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(time) ⇒ Datetime
Returns a new instance of Datetime.
3 4 5 |
# File 'lib/countdowner/datetime.rb', line 3 def initialize(time) @utc = time.getutc end |
Instance Method Details
#iso ⇒ Object
7 8 9 |
# File 'lib/countdowner/datetime.rb', line 7 def iso @utc.iso8601 end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/countdowner/datetime.rb', line 11 def to_s @utc.to_s end |