Class: Omdb::Movie
- Inherits:
-
Object
- Object
- Omdb::Movie
- Defined in:
- lib/omdb/movie.rb
Instance Attribute Summary collapse
-
#actors ⇒ Object
readonly
Returns the value of attribute actors.
-
#awards ⇒ Object
readonly
Returns the value of attribute awards.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#director ⇒ Object
readonly
Returns the value of attribute director.
-
#genre ⇒ Object
readonly
Returns the value of attribute genre.
-
#imdb_id ⇒ Object
readonly
Returns the value of attribute imdb_id.
-
#imdb_rating ⇒ Object
readonly
Returns the value of attribute imdb_rating.
-
#imdb_votes ⇒ Object
readonly
Returns the value of attribute imdb_votes.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#loaded ⇒ Object
readonly
Returns the value of attribute loaded.
-
#metascore ⇒ Object
readonly
Returns the value of attribute metascore.
-
#plot ⇒ Object
readonly
Returns the value of attribute plot.
-
#poster ⇒ Object
readonly
Returns the value of attribute poster.
-
#rated ⇒ Object
readonly
Returns the value of attribute rated.
-
#released ⇒ Object
readonly
Returns the value of attribute released.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#writer ⇒ Object
readonly
Returns the value of attribute writer.
-
#year ⇒ Object
readonly
Returns the value of attribute year.
Instance Method Summary collapse
-
#initialize(movie) ⇒ Movie
constructor
A new instance of Movie.
Constructor Details
#initialize(movie) ⇒ Movie
Returns a new instance of Movie.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/omdb/movie.rb', line 6 def initialize(movie) @title = movie["Title"] @year = movie["Year"].to_i @imdb_id = movie["imdbID"] @type = movie["Type"] @rated = movie["Rated"] @released = movie["Released"] @runtime = movie["Runtime"] @genre = movie["Genre"] @director = movie["Director"] @writer = movie["Writer"] @actors = movie["Actors"] @plot = movie["Plot"] @poster = movie["Poster"] @metascore = movie["Metascore"] @language = movie["Language"] @country = movie["Country"] @awards = movie["Awards"] end |
Instance Attribute Details
#actors ⇒ Object (readonly)
Returns the value of attribute actors.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def actors @actors end |
#awards ⇒ Object (readonly)
Returns the value of attribute awards.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def awards @awards end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def country @country end |
#director ⇒ Object (readonly)
Returns the value of attribute director.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def director @director end |
#genre ⇒ Object (readonly)
Returns the value of attribute genre.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def genre @genre end |
#imdb_id ⇒ Object (readonly)
Returns the value of attribute imdb_id.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def imdb_id @imdb_id end |
#imdb_rating ⇒ Object (readonly)
Returns the value of attribute imdb_rating.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def @imdb_rating end |
#imdb_votes ⇒ Object (readonly)
Returns the value of attribute imdb_votes.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def imdb_votes @imdb_votes end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def language @language end |
#loaded ⇒ Object (readonly)
Returns the value of attribute loaded.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def loaded @loaded end |
#metascore ⇒ Object (readonly)
Returns the value of attribute metascore.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def @metascore end |
#plot ⇒ Object (readonly)
Returns the value of attribute plot.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def plot @plot end |
#poster ⇒ Object (readonly)
Returns the value of attribute poster.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def poster @poster end |
#rated ⇒ Object (readonly)
Returns the value of attribute rated.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def rated @rated end |
#released ⇒ Object (readonly)
Returns the value of attribute released.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def released @released end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def runtime @runtime end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def type @type end |
#writer ⇒ Object (readonly)
Returns the value of attribute writer.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def writer @writer end |
#year ⇒ Object (readonly)
Returns the value of attribute year.
3 4 5 |
# File 'lib/omdb/movie.rb', line 3 def year @year end |