Class: TomatoPower::Clip
- Inherits:
-
Object
- Object
- TomatoPower::Clip
- Defined in:
- lib/tomato_power/movie/clip.rb
Overview
Clip of a movie
Instance Attribute Summary collapse
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#thumbnail ⇒ Object
readonly
Returns the value of attribute thumbnail.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(clip = {}) ⇒ Clip
constructor
A new instance of Clip.
Constructor Details
#initialize(clip = {}) ⇒ Clip
Returns a new instance of Clip.
5 6 7 8 9 10 |
# File 'lib/tomato_power/movie/clip.rb', line 5 def initialize clip={} @title = clip["title"] @duration = clip["duration"] @thumbnail = clip["thumbnail"] @link = clip["links"]["alternate"] end |
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
4 5 6 |
# File 'lib/tomato_power/movie/clip.rb', line 4 def duration @duration end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
4 5 6 |
# File 'lib/tomato_power/movie/clip.rb', line 4 def link @link end |
#thumbnail ⇒ Object (readonly)
Returns the value of attribute thumbnail.
4 5 6 |
# File 'lib/tomato_power/movie/clip.rb', line 4 def thumbnail @thumbnail end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/tomato_power/movie/clip.rb', line 4 def title @title end |