Class: ChannelMediaItem

Inherits:
MediaItem show all
Defined in:
lib/etvnet_seek/core/channel_media_item.rb

Instance Attribute Summary collapse

Attributes inherited from MediaItem

#additional_info, #link, #media_file, #text, #underscore_name

Instance Method Summary collapse

Methods inherited from MediaItem

#==, #access_page?, #folder?

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

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

#channelObject



10
11
12
# File 'lib/etvnet_seek/core/channel_media_item.rb', line 10

def channel
  link.scan(/\/(\w*)/)[2]
end

#to_sObject



14
15
16
# File 'lib/etvnet_seek/core/channel_media_item.rb', line 14

def to_s
  super + " (#{channel})"
end