Class: Omdb::Movie

Inherits:
Object
  • Object
show all
Defined in:
lib/omdb/movie.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actorsObject (readonly)

Returns the value of attribute actors.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def actors
  @actors
end

#awardsObject (readonly)

Returns the value of attribute awards.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def awards
  @awards
end

#countryObject (readonly)

Returns the value of attribute country.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def country
  @country
end

#directorObject (readonly)

Returns the value of attribute director.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def director
  @director
end

#genreObject (readonly)

Returns the value of attribute genre.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def genre
  @genre
end

#imdb_idObject (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_ratingObject (readonly)

Returns the value of attribute imdb_rating.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def imdb_rating
  @imdb_rating
end

#imdb_votesObject (readonly)

Returns the value of attribute imdb_votes.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def imdb_votes
  @imdb_votes
end

#languageObject (readonly)

Returns the value of attribute language.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def language
  @language
end

#loadedObject (readonly)

Returns the value of attribute loaded.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def loaded
  @loaded
end

#metascoreObject (readonly)

Returns the value of attribute metascore.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def metascore
  @metascore
end

#plotObject (readonly)

Returns the value of attribute plot.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def plot
  @plot
end

#posterObject (readonly)

Returns the value of attribute poster.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def poster
  @poster
end

#ratedObject (readonly)

Returns the value of attribute rated.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def rated
  @rated
end

#releasedObject (readonly)

Returns the value of attribute released.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def released
  @released
end

#runtimeObject (readonly)

Returns the value of attribute runtime.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def runtime
  @runtime
end

#titleObject (readonly)

Returns the value of attribute title.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def type
  @type
end

#writerObject (readonly)

Returns the value of attribute writer.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def writer
  @writer
end

#yearObject (readonly)

Returns the value of attribute year.



3
4
5
# File 'lib/omdb/movie.rb', line 3

def year
  @year
end