Class: CatalogItem
- Defined in:
- lib/etvnet_seek/core/catalog_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.
-
#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
Methods inherited from MediaItem
#==, #access_page?, #initialize
Constructor Details
This class inherits a constructor from MediaItem
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
2 3 4 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 2 def channel @channel end |
#duration ⇒ Object
Returns the value of attribute duration.
2 3 4 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 2 def duration @duration end |
#folder ⇒ Object
Returns the value of attribute folder.
2 3 4 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 2 def folder @folder end |
#rating ⇒ Object
Returns the value of attribute rating.
2 3 4 |
# File 'lib/etvnet_seek/core/catalog_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/catalog_item.rb', line 2 def @rating_image end |
#showtime ⇒ Object
Returns the value of attribute showtime.
2 3 4 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 2 def showtime @showtime end |
#year ⇒ Object
Returns the value of attribute year.
2 3 4 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 2 def year @year end |
Instance Method Details
#folder? ⇒ Boolean
4 5 6 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 4 def folder? folder == true end |
#to_s ⇒ Object
8 9 10 11 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 |
# File 'lib/etvnet_seek/core/catalog_item.rb', line 8 def to_s 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 += " --- #{duration}" if not duration.nil? and duration.size > 0 buffer += " --- #{year}" if not year.nil? and year.size > 2 buffer += " --- #{channel}" if channel buffer += " --- #{}" if buffer += " --- #{}" if buffer end |