Class: Fc2video::Video
- Inherits:
-
Object
- Object
- Fc2video::Video
- Defined in:
- lib/fc2video/video.rb
Instance Attribute Summary collapse
-
#bookmarks ⇒ Object
readonly
Returns the value of attribute bookmarks.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#image_url ⇒ Object
readonly
Returns the value of attribute image_url.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#views ⇒ Object
readonly
Returns the value of attribute views.
Instance Method Summary collapse
- #adult? ⇒ Boolean
- #for_all? ⇒ Boolean
- #for_premium? ⇒ Boolean
- #for_sale? ⇒ Boolean
-
#initialize(params) ⇒ Video
constructor
A new instance of Video.
Constructor Details
#initialize(params) ⇒ Video
Returns a new instance of Video.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/fc2video/video.rb', line 5 def initialize(params) @title = params[:title] @duration = params[:duration] @url = params[:url] @image_url = params[:image_url] @views = params[:views] @bookmarks = params[:bookmarks] @adult = params[:adult] @status = params[:status] end |
Instance Attribute Details
#bookmarks ⇒ Object (readonly)
Returns the value of attribute bookmarks.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def bookmarks @bookmarks end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def duration @duration end |
#image_url ⇒ Object (readonly)
Returns the value of attribute image_url.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def image_url @image_url end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def status @status end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def url @url end |
#views ⇒ Object (readonly)
Returns the value of attribute views.
3 4 5 |
# File 'lib/fc2video/video.rb', line 3 def views @views end |
Instance Method Details
#adult? ⇒ Boolean
16 17 18 |
# File 'lib/fc2video/video.rb', line 16 def adult? @adult end |
#for_all? ⇒ Boolean
20 21 22 |
# File 'lib/fc2video/video.rb', line 20 def for_all? @status == :all end |
#for_premium? ⇒ Boolean
24 25 26 |
# File 'lib/fc2video/video.rb', line 24 def for_premium? @status == :premium end |
#for_sale? ⇒ Boolean
28 29 30 |
# File 'lib/fc2video/video.rb', line 28 def for_sale? @status == :sale end |