Class: Kakaxi::Data::Timelapse
- Inherits:
-
Object
- Object
- Kakaxi::Data::Timelapse
- Defined in:
- lib/kakaxi/data/timelapse.rb
Instance Attribute Summary collapse
-
#end_datetime ⇒ Object
readonly
Returns the value of attribute end_datetime.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#start_datetime ⇒ Object
readonly
Returns the value of attribute start_datetime.
-
#thumbnail ⇒ Object
readonly
Returns the value of attribute thumbnail.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(id: nil, start_datetime: nil, end_datetime: nil, url: nil, thumbnail_name: nil, thumbnail_url: nil) ⇒ Timelapse
constructor
A new instance of Timelapse.
Constructor Details
#initialize(id: nil, start_datetime: nil, end_datetime: nil, url: nil, thumbnail_name: nil, thumbnail_url: nil) ⇒ Timelapse
Returns a new instance of Timelapse.
8 9 10 11 12 13 14 |
# File 'lib/kakaxi/data/timelapse.rb', line 8 def initialize(id: nil, start_datetime: nil, end_datetime: nil, url: nil, thumbnail_name: nil, thumbnail_url: nil) @id = id @start_datetime = DateTime.strptime(start_datetime, '%Y-%m-%dT%H:%M:%SZ') @end_datetime = DateTime.strptime(end_datetime, '%Y-%m-%dT%H:%M:%SZ') @url = URI.parse(url) @thumbnail = { name: thumbnail_name, url: thumbnail_url } end |
Instance Attribute Details
#end_datetime ⇒ Object (readonly)
Returns the value of attribute end_datetime.
6 7 8 |
# File 'lib/kakaxi/data/timelapse.rb', line 6 def end_datetime @end_datetime end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/kakaxi/data/timelapse.rb', line 6 def id @id end |
#start_datetime ⇒ Object (readonly)
Returns the value of attribute start_datetime.
6 7 8 |
# File 'lib/kakaxi/data/timelapse.rb', line 6 def start_datetime @start_datetime end |
#thumbnail ⇒ Object (readonly)
Returns the value of attribute thumbnail.
6 7 8 |
# File 'lib/kakaxi/data/timelapse.rb', line 6 def thumbnail @thumbnail end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
6 7 8 |
# File 'lib/kakaxi/data/timelapse.rb', line 6 def url @url end |