Class: BrowseMediaItem
- Defined in:
- lib/etvnet_seek/core/browse_media_item.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#folder ⇒ Object
Returns the value of attribute folder.
-
#image ⇒ Object
Returns the value of attribute image.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#rating_image ⇒ Object
Returns the value of attribute rating_image.
-
#showtime ⇒ Object
Returns the value of attribute showtime.
-
#year ⇒ Object
Returns the value of attribute year.
Attributes inherited from MediaItem
#additional_info, #link, #media_file, #text, #underscore_name
Instance Method Summary collapse
- #folder? ⇒ Boolean
-
#initialize(text, link) ⇒ BrowseMediaItem
constructor
A new instance of BrowseMediaItem.
- #to_s ⇒ Object
Methods inherited from MediaItem
Constructor Details
#initialize(text, link) ⇒ BrowseMediaItem
Returns a new instance of BrowseMediaItem.
4 5 6 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 4 def initialize(text, link) super(text, link) end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def channel @channel end |
#duration ⇒ Object
Returns the value of attribute duration.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def duration @duration end |
#folder ⇒ Object
Returns the value of attribute folder.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def folder @folder end |
#image ⇒ Object
Returns the value of attribute image.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def image @image end |
#rating ⇒ Object
Returns the value of attribute rating.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def @rating end |
#rating_image ⇒ Object
Returns the value of attribute rating_image.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def @rating_image end |
#showtime ⇒ Object
Returns the value of attribute showtime.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def showtime @showtime end |
#year ⇒ Object
Returns the value of attribute year.
2 3 4 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 2 def year @year end |
Instance Method Details
#folder? ⇒ Boolean
8 9 10 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 8 def folder? folder == true end |
#to_s ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/etvnet_seek/core/browse_media_item.rb', line 12 def to_s #buffer = "" if folder? buffer = "*** Folder *** " else buffer = "" end buffer += text unless folder? if underscore_name buffer += ": #{underscore_name}" else buffer += ": #{link}" end end buffer += " --- #{showtime}" if showtime buffer += " (#{media_file})" if not media_file.nil? and media_file.size > 0 buffer += " --- #{year}" if not year.nil? and year.size > 2 buffer += " --- #{duration}" if not duration.nil? and duration.size > 0 buffer += " --- #{channel}" if channel buffer += " --- #{image}" if image buffer += " --- #{}" if buffer end |