Class: FilmOn::Programme
- Inherits:
-
Object
- Object
- FilmOn::Programme
- Defined in:
- lib/film_on/models/programme.rb
Overview
Programme holds the detail of a TV programme, it takes a raw hash and converts it into a nice ruby object
Defined Under Namespace
Classes: Image
Instance Attribute Summary collapse
-
#allow_dvr ⇒ Object
readonly
Returns the value of attribute allow_dvr.
-
#allow_reminder ⇒ Object
readonly
Returns the value of attribute allow_reminder.
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#enddatetime ⇒ Object
readonly
Returns the value of attribute enddatetime.
-
#episode_number ⇒ Object
readonly
Returns the value of attribute episode_number.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#is_series ⇒ Object
readonly
Returns the value of attribute is_series.
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#programme ⇒ Object
readonly
Returns the value of attribute programme.
-
#programme_description ⇒ Object
readonly
Returns the value of attribute programme_description.
-
#programme_name ⇒ Object
readonly
Returns the value of attribute programme_name.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#series_id ⇒ Object
readonly
Returns the value of attribute series_id.
-
#series_number ⇒ Object
readonly
Returns the value of attribute series_number.
-
#startdatetime ⇒ Object
readonly
Returns the value of attribute startdatetime.
-
#vendor_id ⇒ Object
readonly
Returns the value of attribute vendor_id.
Instance Method Summary collapse
- #get_images(imgs) ⇒ Object
-
#initialize(hash) ⇒ Programme
constructor
A new instance of Programme.
Constructor Details
#initialize(hash) ⇒ Programme
Returns a new instance of Programme.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/film_on/models/programme.rb', line 13 def initialize(hash) @programme = hash["programme"] @startdatetime = hash["startdatetime"] @enddatetime = hash["enddatetime"] @duration = hash["duration"] @length = hash["length"] @programme_description = hash["programme_description"] @programme_name = hash["programme_name"] @allow_dvr = hash["allow_dvr"] @allow_reminder = hash["allow_reminder"] @channel_id = hash["channel_id"] @images = get_images(hash["images"]) @provider = hash["provider"] @vendor_id = hash["vendor_id"] @series_number = hash["seriesNumber"] @episode_number = hash["episodeNumber"] @series_id = hash["seriesId"] @is_series = hash["isSeries"] end |
Instance Attribute Details
#allow_dvr ⇒ Object (readonly)
Returns the value of attribute allow_dvr.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def allow_dvr @allow_dvr end |
#allow_reminder ⇒ Object (readonly)
Returns the value of attribute allow_reminder.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def allow_reminder @allow_reminder end |
#channel_id ⇒ Object (readonly)
Returns the value of attribute channel_id.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def channel_id @channel_id end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def duration @duration end |
#enddatetime ⇒ Object (readonly)
Returns the value of attribute enddatetime.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def enddatetime @enddatetime end |
#episode_number ⇒ Object (readonly)
Returns the value of attribute episode_number.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def episode_number @episode_number end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def images @images end |
#is_series ⇒ Object (readonly)
Returns the value of attribute is_series.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def is_series @is_series end |
#length ⇒ Object (readonly)
Returns the value of attribute length.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def length @length end |
#programme ⇒ Object (readonly)
Returns the value of attribute programme.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def programme @programme end |
#programme_description ⇒ Object (readonly)
Returns the value of attribute programme_description.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def programme_description @programme_description end |
#programme_name ⇒ Object (readonly)
Returns the value of attribute programme_name.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def programme_name @programme_name end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def provider @provider end |
#series_id ⇒ Object (readonly)
Returns the value of attribute series_id.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def series_id @series_id end |
#series_number ⇒ Object (readonly)
Returns the value of attribute series_number.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def series_number @series_number end |
#startdatetime ⇒ Object (readonly)
Returns the value of attribute startdatetime.
10 11 12 |
# File 'lib/film_on/models/programme.rb', line 10 def startdatetime @startdatetime end |
#vendor_id ⇒ Object (readonly)
Returns the value of attribute vendor_id.
11 12 13 |
# File 'lib/film_on/models/programme.rb', line 11 def vendor_id @vendor_id end |