Class: ChannelMediaItem
- Defined in:
- lib/etvnet_seek/core/channel_media_item.rb
Instance Attribute Summary collapse
-
#catalog_link ⇒ Object
readonly
Returns the value of attribute catalog_link.
Attributes inherited from MediaItem
#additional_info, #link, #media_file, #text, #underscore_name
Instance Method Summary collapse
- #channel ⇒ Object
-
#initialize(text, link, catalog_link) ⇒ ChannelMediaItem
constructor
A new instance of ChannelMediaItem.
- #to_s ⇒ Object
Methods inherited from MediaItem
Constructor Details
#initialize(text, link, catalog_link) ⇒ ChannelMediaItem
Returns a new instance of ChannelMediaItem.
4 5 6 7 8 |
# File 'lib/etvnet_seek/core/channel_media_item.rb', line 4 def initialize(text, link, catalog_link) super(text, link) @catalog_link = catalog_link end |
Instance Attribute Details
#catalog_link ⇒ Object (readonly)
Returns the value of attribute catalog_link.
2 3 4 |
# File 'lib/etvnet_seek/core/channel_media_item.rb', line 2 def catalog_link @catalog_link end |
Instance Method Details
#channel ⇒ Object
10 11 12 |
# File 'lib/etvnet_seek/core/channel_media_item.rb', line 10 def channel link.scan(/\/(\w*)/)[2] end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/etvnet_seek/core/channel_media_item.rb', line 14 def to_s super + " (#{channel})" end |