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 from #channel, takes a raw hash and converts it into a nice ruby object
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
Returns a new instance of Channel.
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 18 def initialize(hash) @id = hash["id"] @title = hash["title"] @alias = hash["alias"] @logo = hash["logo"] @big_logo = hash["big_logo"] @content_rating = 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"] @preload_message = hash["preload_message"] @preload_timeout = hash["preload_timeout"] @is_local = hash["is_local"] @preload_intro = hash["preload_intro"] @images = hash["images"] @schedule = hash["schedule"] @now_playing = hash["now_playing"] ? FilmOn::Programme.new(hash["now_playing"]) : nil @next_playing = 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.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def adult_content @adult_content end |
#alias ⇒ Object (readonly)
Returns the value of attribute alias.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def alias @alias end |
#big_logo ⇒ Object (readonly)
Returns the value of attribute big_logo.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def big_logo @big_logo end |
#chat_keyword ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def chat_keyword @chat_keyword end |
#content_rating ⇒ Object (readonly)
Returns the value of attribute content_rating.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def @content_rating end |
#extra_big_logo ⇒ Object (readonly)
Returns the value of attribute extra_big_logo.
13 14 15 |
# File 'lib/film_on/models/channel.rb', line 13 def extra_big_logo @extra_big_logo end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def group @group end |
#group_id ⇒ Object (readonly)
Returns the value of attribute group_id.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def group_id @group_id end |
#has_tvguide ⇒ Object (readonly)
Returns the value of attribute has_tvguide.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def has_tvguide @has_tvguide end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def hash @hash end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def id @id end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def images @images end |
#is_adult ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def is_adult @is_adult end |
#is_favorite ⇒ Object (readonly)
Returns the value of attribute is_favorite.
13 14 15 |
# File 'lib/film_on/models/channel.rb', line 13 def is_favorite @is_favorite end |
#is_free ⇒ Object (readonly)
Returns the value of attribute is_free.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def is_free @is_free end |
#is_free_sd_mode ⇒ Object (readonly)
Returns the value of attribute is_free_sd_mode.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def is_free_sd_mode @is_free_sd_mode end |
#is_interactive ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def is_interactive @is_interactive end |
#is_local ⇒ Object (readonly)
Returns the value of attribute is_local.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def is_local @is_local end |
#is_vod ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def is_vod @is_vod end |
#is_vox ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def is_vox @is_vox end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def logo @logo end |
#next_playing ⇒ Object (readonly)
Returns the value of attribute next_playing.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def @next_playing end |
#now_playing ⇒ Object (readonly)
Returns the value of attribute now_playing.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def @now_playing end |
#preload_intro ⇒ Object (readonly)
Returns the value of attribute preload_intro.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def preload_intro @preload_intro end |
#preload_message ⇒ Object (readonly)
Returns the value of attribute preload_message.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def @preload_message end |
#preload_timeout ⇒ Object (readonly)
Returns the value of attribute preload_timeout.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def preload_timeout @preload_timeout end |
#programmes ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def programmes @programmes end |
#recordable ⇒ Object (readonly)
extended
15 16 17 |
# File 'lib/film_on/models/channel.rb', line 15 def recordable @recordable end |
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def schedule @schedule end |
#seekable ⇒ Object (readonly)
Returns the value of attribute seekable.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def seekable @seekable end |
#serverside_record ⇒ Object (readonly)
Returns the value of attribute serverside_record.
13 14 15 |
# File 'lib/film_on/models/channel.rb', line 13 def serverside_record @serverside_record end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/film_on/models/channel.rb', line 11 def title @title end |
#tvguide ⇒ Object (readonly)
Returns the value of attribute tvguide.
16 17 18 |
# File 'lib/film_on/models/channel.rb', line 16 def tvguide @tvguide end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/film_on/models/channel.rb', line 12 def type @type end |
#upnp_enabled ⇒ Object (readonly)
Returns the value of attribute upnp_enabled.
13 14 15 |
# File 'lib/film_on/models/channel.rb', line 13 def upnp_enabled @upnp_enabled end |