Class: LinkInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/etvnet_seek/link_info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(media_item, media_info) ⇒ LinkInfo

Returns a new instance of LinkInfo.



4
5
6
7
# File 'lib/etvnet_seek/link_info.rb', line 4

def initialize(media_item, media_info)
  @media_item = media_item
  @media_info = media_info
end

Instance Attribute Details

#media_infoObject (readonly)

Returns the value of attribute media_info.



2
3
4
# File 'lib/etvnet_seek/link_info.rb', line 2

def media_info
  @media_info
end

#media_itemObject (readonly)

Returns the value of attribute media_item.



2
3
4
# File 'lib/etvnet_seek/link_info.rb', line 2

def media_item
  @media_item
end

Instance Method Details



29
30
31
# File 'lib/etvnet_seek/link_info.rb', line 29

def link
  media_info.link
end

#media_fileObject



25
26
27
# File 'lib/etvnet_seek/link_info.rb', line 25

def media_file
  media_item.media_file
end

#nameObject



21
22
23
# File 'lib/etvnet_seek/link_info.rb', line 21

def name
  media_item.underscore_name
end

#resolved?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/etvnet_seek/link_info.rb', line 9

def resolved?
  not @media_info.link.nil? and not @media_info.link.strip.size == 0
end


33
34
35
# File 'lib/etvnet_seek/link_info.rb', line 33

def rtsp_link
  media_info.rtsp_link
end

#session_expired?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/etvnet_seek/link_info.rb', line 13

def session_expired?
  @media_info.session_expired
end

#textObject



17
18
19
# File 'lib/etvnet_seek/link_info.rb', line 17

def text
  media_item.text
end