Class: TMDBParty::Movie

Inherits:
Object
  • Object
show all
Includes:
Attributes
Defined in:
lib/tmdb_party/movie.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Attributes

included

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

#tmdbObject (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