Class: Kentaa::Api::Resources::Video
- Inherits:
-
Object
- Object
- Kentaa::Api::Resources::Video
- Defined in:
- lib/kentaa/api/resources/video.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #created_at ⇒ Object
- #id ⇒ Object
-
#initialize(data) ⇒ Video
constructor
A new instance of Video.
- #updated_at ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(data) ⇒ Video
Returns a new instance of Video.
11 12 13 |
# File 'lib/kentaa/api/resources/video.rb', line 11 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/kentaa/api/resources/video.rb', line 9 def data @data end |
Instance Method Details
#created_at ⇒ Object
19 20 21 |
# File 'lib/kentaa/api/resources/video.rb', line 19 def created_at Time.parse(data[:created_at]) if data[:created_at] end |
#id ⇒ Object
15 16 17 |
# File 'lib/kentaa/api/resources/video.rb', line 15 def id data[:id] end |
#updated_at ⇒ Object
23 24 25 |
# File 'lib/kentaa/api/resources/video.rb', line 23 def updated_at Time.parse(data[:updated_at]) if data[:updated_at] end |
#url ⇒ Object
27 28 29 |
# File 'lib/kentaa/api/resources/video.rb', line 27 def url data[:url] end |