Class: FilmBuff::Title
- Inherits:
-
Object
- Object
- FilmBuff::Title
- Defined in:
- lib/filmbuff/title.rb
Instance Attribute Summary collapse
-
#genres ⇒ Object
readonly
Returns the value of attribute genres.
-
#imdb_id ⇒ Object
readonly
Returns the value of attribute imdb_id.
-
#plot ⇒ Object
readonly
Returns the value of attribute plot.
-
#poster_url ⇒ Object
readonly
Returns the value of attribute poster_url.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#release_date ⇒ Object
readonly
Returns the value of attribute release_date.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
-
#tagline ⇒ Object
readonly
Returns the value of attribute tagline.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#votes ⇒ Object
readonly
Returns the value of attribute votes.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Title
constructor
A new instance of Title.
Constructor Details
#initialize(options = {}) ⇒ Title
Returns a new instance of Title.
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/filmbuff/title.rb', line 6 def initialize( = {}) @imdb_id = ["tconst"] @title = ["title"] @tagline = ["tagline"] @plot = ["plot"]["outline"] if ["plot"] @runtime = ["runtime"]["time"] if ["runtime"] @rating = ["rating"] @votes = ["num_votes"] @poster_url = ["image"]["url"] if ["image"] @genres = ["genres"] || [] @release_date = ["release_date"]["normal"] if ["release_date"]["normal"] end |
Instance Attribute Details
#genres ⇒ Object (readonly)
Returns the value of attribute genres.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def genres @genres end |
#imdb_id ⇒ Object (readonly)
Returns the value of attribute imdb_id.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def imdb_id @imdb_id end |
#plot ⇒ Object (readonly)
Returns the value of attribute plot.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def plot @plot end |
#poster_url ⇒ Object (readonly)
Returns the value of attribute poster_url.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def poster_url @poster_url end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def @rating end |
#release_date ⇒ Object (readonly)
Returns the value of attribute release_date.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def release_date @release_date end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def runtime @runtime end |
#tagline ⇒ Object (readonly)
Returns the value of attribute tagline.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def tagline @tagline end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def title @title end |
#votes ⇒ Object (readonly)
Returns the value of attribute votes.
3 4 5 |
# File 'lib/filmbuff/title.rb', line 3 def votes @votes end |