Class: FilmOn::Channel
- Inherits:
-
Object
- Object
- FilmOn::Channel
- Defined in:
- lib/film_on/models/channel.rb
Overview
FilmOn::Channel Channel can have either a basic set of data or a more verbose set depending on whether it is called as part of a channels list or as in individual call
Instance Attribute Summary collapse
-
#adult_content ⇒ Object
readonly
Returns the value of attribute adult_content.
-
#alias ⇒ Object
readonly
Returns the value of attribute alias.
-
#big_logo ⇒ Object
readonly
Returns the value of attribute big_logo.
-
#chat_keyword ⇒ Object
readonly
extended.
-
#content_rating ⇒ Object
readonly
Returns the value of attribute content_rating.
-
#extra_big_logo ⇒ Object
readonly
Returns the value of attribute extra_big_logo.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#group_id ⇒ Object
readonly
Returns the value of attribute group_id.
-
#has_tvguide ⇒ Object
readonly
Returns the value of attribute has_tvguide.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#is_adult ⇒ Object
readonly
extended.
-
#is_favorite ⇒ Object
readonly
Returns the value of attribute is_favorite.
-
#is_free ⇒ Object
readonly
Returns the value of attribute is_free.
-
#is_free_sd_mode ⇒ Object
readonly
Returns the value of attribute is_free_sd_mode.
-
#is_interactive ⇒ Object
readonly
extended.
-
#is_local ⇒ Object
readonly
Returns the value of attribute is_local.
-
#is_vod ⇒ Object
readonly
extended.
-
#is_vox ⇒ Object
readonly
extended.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#next_playing ⇒ Object
readonly
Returns the value of attribute next_playing.
-
#now_playing ⇒ Object
readonly
Returns the value of attribute now_playing.
-
#preload_intro ⇒ Object
readonly
Returns the value of attribute preload_intro.
-
#preload_message ⇒ Object
readonly
Returns the value of attribute preload_message.
-
#preload_timeout ⇒ Object
readonly
Returns the value of attribute preload_timeout.
-
#programmes ⇒ Object
readonly
extended.
-
#recordable ⇒ Object
readonly
extended.
-
#schedule ⇒ Object
readonly
Returns the value of attribute schedule.
-
#seekable ⇒ Object
readonly
Returns the value of attribute seekable.
-
#serverside_record ⇒ Object
readonly
Returns the value of attribute serverside_record.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tvguide ⇒ Object
readonly
Returns the value of attribute tvguide.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#upnp_enabled ⇒ Object
readonly
Returns the value of attribute upnp_enabled.
Instance Method Summary collapse
- #get_tvguide(guide) ⇒ Object
-
#initialize(hash) ⇒ Channel
constructor
A new instance of Channel.
Constructor Details
#initialize(hash) ⇒ Channel
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/film_on/models/channel.rb', line 17 def initialize(hash) @hash = hash @id = hash["id"] @title = hash["title"] @alias = hash["alias"] @logo = hash["logo"] @big_logo = hash["big_logo"] = hash["content_rating"] @adult_content = hash["adult_content"] @group = hash["group"] @group_id = hash["group_id"] @is_free = hash["is_free"] @is_free_sd_mode = hash["is_free_sd_mode"] @type = hash["type"] @has_tvguide = hash["has_tvguide"] @seekable = hash["seekable"] @serverside_record = hash["serverside_record"] @extra_big_logo = hash["extra_big_logo"] @upnp_enabled = hash["upnp_enabled"] @is_favorite = hash["is_favorite"] #extended @is_adult = hash["is_adult"] @is_interactive = hash["is_interactive"] @is_vod = hash["is_vod"] @is_vox = hash["is_vox"] @chat_keyword = hash["chat_keyword"] @recordable = hash["recordable"] = hash["preload_message"] @preload_timeout = hash["preload_timeout"] @is_local = hash["is_local"] @preload_intro = hash["preload_intro"] @images = hash["images"] @schedule = hash["schedule"] = hash["now_playing"] ? FilmOn::Programme.new(hash["now_playing"]) : nil = hash["next_playing"] ? FilmOn::Programme.new(hash["next_playing"]) : nil @tvguide = get_tvguide(hash["tvguide"]) end |
Instance Attribute Details
#adult_content ⇒ Object (readonly)
Returns the value of attribute adult_content.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def adult_content @adult_content end |
#alias ⇒ Object (readonly)
Returns the value of attribute alias.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def alias @alias end |
#big_logo ⇒ Object (readonly)
Returns the value of attribute big_logo.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def big_logo @big_logo end |
#chat_keyword ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def chat_keyword @chat_keyword end |
#content_rating ⇒ Object (readonly)
Returns the value of attribute content_rating.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def end |
#extra_big_logo ⇒ Object (readonly)
Returns the value of attribute extra_big_logo.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def extra_big_logo @extra_big_logo end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def group @group end |
#group_id ⇒ Object (readonly)
Returns the value of attribute group_id.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def group_id @group_id end |
#has_tvguide ⇒ Object (readonly)
Returns the value of attribute has_tvguide.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def has_tvguide @has_tvguide end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def hash @hash end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def id @id end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def images @images end |
#is_adult ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def is_adult @is_adult end |
#is_favorite ⇒ Object (readonly)
Returns the value of attribute is_favorite.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def is_favorite @is_favorite end |
#is_free ⇒ Object (readonly)
Returns the value of attribute is_free.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def is_free @is_free end |
#is_free_sd_mode ⇒ Object (readonly)
Returns the value of attribute is_free_sd_mode.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def is_free_sd_mode @is_free_sd_mode end |
#is_interactive ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def is_interactive @is_interactive end |
#is_local ⇒ Object (readonly)
Returns the value of attribute is_local.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def is_local @is_local end |
#is_vod ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def is_vod @is_vod end |
#is_vox ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def is_vox @is_vox end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def logo @logo end |
#next_playing ⇒ Object (readonly)
Returns the value of attribute next_playing.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def end |
#now_playing ⇒ Object (readonly)
Returns the value of attribute now_playing.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def end |
#preload_intro ⇒ Object (readonly)
Returns the value of attribute preload_intro.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def preload_intro @preload_intro end |
#preload_message ⇒ Object (readonly)
Returns the value of attribute preload_message.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def end |
#preload_timeout ⇒ Object (readonly)
Returns the value of attribute preload_timeout.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def preload_timeout @preload_timeout end |
#programmes ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def programmes @programmes end |
#recordable ⇒ Object (readonly)
extended
14 15 16 |
# File 'lib/film_on/models/channel.rb', line 14 def recordable @recordable end |
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def schedule @schedule end |
#seekable ⇒ Object (readonly)
Returns the value of attribute seekable.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def seekable @seekable end |
#serverside_record ⇒ Object (readonly)
Returns the value of attribute serverside_record.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def serverside_record @serverside_record end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
10 11 12 |
# File 'lib/film_on/models/channel.rb', line 10 def title @title end |
#tvguide ⇒ Object (readonly)
Returns the value of attribute tvguide.
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def tvguide @tvguide end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def type @type end |
#upnp_enabled ⇒ Object (readonly)
Returns the value of attribute upnp_enabled.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def upnp_enabled @upnp_enabled end |
Instance Method Details
#get_tvguide(guide) ⇒ Object
55 56 57 58 |
# File 'lib/film_on/models/channel.rb', line 55 def get_tvguide(guide) return [] unless guide guide.map{|gu| FilmOn::Programme.new(gu) } end |