Class: FilmOn::Movie
- Inherits:
-
Object
- Object
- FilmOn::Movie
- Defined in:
- lib/film_on/models/movie.rb
Overview
FilmOn::Movie Movie can have either a basic set of data or a more verbose set depending on whether it is called as part of a vod_search or as in individual call from #movie, takes a raw hash and converts it into a nice ruby object
Instance Attribute Summary collapse
-
#artwork ⇒ Object
readonly
Returns the value of attribute artwork.
-
#cast ⇒ Object
readonly
Returns the value of attribute cast.
-
#content_blocked ⇒ Object
readonly
Returns the value of attribute content_blocked.
-
#content_host ⇒ Object
readonly
Returns the value of attribute content_host.
-
#crew ⇒ Object
readonly
Returns the value of attribute crew.
-
#deleted_at ⇒ Object
readonly
Returns the value of attribute deleted_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#episodes_count ⇒ Object
readonly
Returns the value of attribute episodes_count.
-
#exists_on_edgecast ⇒ Object
readonly
Returns the value of attribute exists_on_edgecast.
-
#genres ⇒ Object
readonly
Returns the value of attribute genres.
-
#georule ⇒ Object
readonly
Returns the value of attribute georule.
-
#high_quality_file_id ⇒ Object
readonly
Returns the value of attribute high_quality_file_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_enabled ⇒ Object
readonly
Returns the value of attribute is_enabled.
-
#is_featured ⇒ Object
readonly
Returns the value of attribute is_featured.
-
#low_quality_file_id ⇒ Object
readonly
Returns the value of attribute low_quality_file_id.
-
#parent_id ⇒ Object
readonly
Returns the value of attribute parent_id.
-
#poster ⇒ Object
readonly
Returns the value of attribute poster.
-
#series_number ⇒ Object
readonly
Returns the value of attribute series_number.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#streams ⇒ Object
readonly
Returns the value of attribute streams.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#type_id ⇒ Object
readonly
Returns the value of attribute type_id.
-
#vendor_id ⇒ Object
readonly
Returns the value of attribute vendor_id.
-
#vendorka_id ⇒ Object
readonly
Returns the value of attribute vendorka_id.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Movie
constructor
A new instance of Movie.
Constructor Details
#initialize(hash) ⇒ Movie
Returns a new instance of Movie.
16 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 |
# File 'lib/film_on/models/movie.rb', line 16 def initialize(hash) @id = hash["id"] @title = hash["title"] @slug = hash["slug"] @description = hash["description"] @type_id = hash["type_id"] @series_number = hash["series_number"] @episodes_count = hash["episodes_count"] @vendor_id = hash["vendor_id"] @vendorka_id = hash["vendorka_id"] @content_host = hash["content_host"] @low_quality_file_id = hash["low_quality_file_id"] @high_quality_file_id = hash["high_quality_file_id"] @parent_id = hash["parent_id"] @exists_on_edgecast = hash["exists_on_edgecast"] @is_featured = hash["is_featured"] @is_enabled = hash["is_enabled"] @deleted_at = hash["deleted_at"] @genres = hash["genres"] @cast = hash["cast"] @crew = hash["crew"] @artwork = hash["artwork"] #TODO convert to image structs @poster = hash["poster"] #TODO convert to image structs @georule = hash["georule"] @type = hash["type"] @streams = hash["streams"] @content_blocked = hash["content_blocked"] end |
Instance Attribute Details
#artwork ⇒ Object (readonly)
Returns the value of attribute artwork.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def artwork @artwork end |
#cast ⇒ Object (readonly)
Returns the value of attribute cast.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def cast @cast end |
#content_blocked ⇒ Object (readonly)
Returns the value of attribute content_blocked.
14 15 16 |
# File 'lib/film_on/models/movie.rb', line 14 def content_blocked @content_blocked end |
#content_host ⇒ Object (readonly)
Returns the value of attribute content_host.
12 13 14 |
# File 'lib/film_on/models/movie.rb', line 12 def content_host @content_host end |
#crew ⇒ Object (readonly)
Returns the value of attribute crew.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def crew @crew end |
#deleted_at ⇒ Object (readonly)
Returns the value of attribute deleted_at.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def deleted_at @deleted_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def description @description end |
#episodes_count ⇒ Object (readonly)
Returns the value of attribute episodes_count.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def episodes_count @episodes_count end |
#exists_on_edgecast ⇒ Object (readonly)
Returns the value of attribute exists_on_edgecast.
12 13 14 |
# File 'lib/film_on/models/movie.rb', line 12 def exists_on_edgecast @exists_on_edgecast end |
#genres ⇒ Object (readonly)
Returns the value of attribute genres.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def genres @genres end |
#georule ⇒ Object (readonly)
Returns the value of attribute georule.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def georule @georule end |
#high_quality_file_id ⇒ Object (readonly)
Returns the value of attribute high_quality_file_id.
12 13 14 |
# File 'lib/film_on/models/movie.rb', line 12 def high_quality_file_id @high_quality_file_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def id @id end |
#is_enabled ⇒ Object (readonly)
Returns the value of attribute is_enabled.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def is_enabled @is_enabled end |
#is_featured ⇒ Object (readonly)
Returns the value of attribute is_featured.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def is_featured @is_featured end |
#low_quality_file_id ⇒ Object (readonly)
Returns the value of attribute low_quality_file_id.
12 13 14 |
# File 'lib/film_on/models/movie.rb', line 12 def low_quality_file_id @low_quality_file_id end |
#parent_id ⇒ Object (readonly)
Returns the value of attribute parent_id.
12 13 14 |
# File 'lib/film_on/models/movie.rb', line 12 def parent_id @parent_id end |
#poster ⇒ Object (readonly)
Returns the value of attribute poster.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def poster @poster end |
#series_number ⇒ Object (readonly)
Returns the value of attribute series_number.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def series_number @series_number end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def slug @slug end |
#streams ⇒ Object (readonly)
Returns the value of attribute streams.
14 15 16 |
# File 'lib/film_on/models/movie.rb', line 14 def streams @streams end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
13 14 15 |
# File 'lib/film_on/models/movie.rb', line 13 def type @type end |
#type_id ⇒ Object (readonly)
Returns the value of attribute type_id.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def type_id @type_id end |
#vendor_id ⇒ Object (readonly)
Returns the value of attribute vendor_id.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def vendor_id @vendor_id end |
#vendorka_id ⇒ Object (readonly)
Returns the value of attribute vendorka_id.
11 12 13 |
# File 'lib/film_on/models/movie.rb', line 11 def vendorka_id @vendorka_id end |