Class: TMDBParty::Movie
- Inherits:
-
Object
- Object
- TMDBParty::Movie
- Includes:
- Attributes
- Defined in:
- lib/tmdb_party/movie.rb
Instance Attribute Summary collapse
-
#tmdb ⇒ Object
readonly
Returns the value of attribute tmdb.
Instance Method Summary collapse
- #get_info! ⇒ Object
-
#initialize(values, tmdb) ⇒ Movie
constructor
A new instance of Movie.
Methods included from Attributes
Constructor Details
#initialize(values, tmdb) ⇒ Movie
Returns a new instance of Movie.
17 18 19 20 |
# File 'lib/tmdb_party/movie.rb', line 17 def initialize(values, tmdb) @tmdb = tmdb self.attributes = values end |
Instance Attribute Details
#tmdb ⇒ Object (readonly)
Returns the value of attribute tmdb.
4 5 6 |
# File 'lib/tmdb_party/movie.rb', line 4 def tmdb @tmdb end |
Instance Method Details
#get_info! ⇒ Object
22 23 24 25 26 |
# File 'lib/tmdb_party/movie.rb', line 22 def get_info! movie = tmdb.get_info(self.id) @attributes.merge!(movie.attributes) if movie @loaded = true end |