Class: Kakaxi::IntervalPhoto
- Inherits:
-
Object
- Object
- Kakaxi::IntervalPhoto
- Defined in:
- lib/kakaxi/interval_photo.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#taken_at ⇒ Object
readonly
Returns the value of attribute taken_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(id: nil, url: nil, taken_at: nil) ⇒ IntervalPhoto
constructor
A new instance of IntervalPhoto.
Constructor Details
#initialize(id: nil, url: nil, taken_at: nil) ⇒ IntervalPhoto
Returns a new instance of IntervalPhoto.
5 6 7 8 9 |
# File 'lib/kakaxi/interval_photo.rb', line 5 def initialize(id: nil, url: nil, taken_at: nil) @id = id @url = url @taken_at = DateTime.strptime(taken_at, '%Y-%m-%dT%H:%M:%SZ') end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/kakaxi/interval_photo.rb', line 3 def id @id end |
#taken_at ⇒ Object (readonly)
Returns the value of attribute taken_at.
3 4 5 |
# File 'lib/kakaxi/interval_photo.rb', line 3 def taken_at @taken_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/kakaxi/interval_photo.rb', line 3 def url @url end |