Sha256: f5474142e96314d09a6d5da225f14f41cfe6447b3036e75bbbeef5fce1d2b2cf
Contents?: true
Size: 802 Bytes
Versions: 1
Compression:
Stored size: 802 Bytes
Contents
module TMDBParty class Movie include Attributes attr_reader :tmdb attributes :title, :short_overview, :id, :score, :imdb, :type, :url, :popularity, :alternative_title attributes :release, :type=>DateTime attributes :id, :runtime, :type => Integer attributes :popularity, :score, :type => Float attributes :poster, :backdrop, :type => Image attributes :homepage, :lazy => :get_info! attributes :trailer, :lazy => :get_info!, :type=> Video attributes :categories, :lazy => :get_info!, :type=> Category def initialize(values, tmdb) @tmdb = tmdb self.attributes = values end def get_info! movie = tmdb.get_info(self.id) @attributes.merge!(movie.attributes) if movie @loaded = true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jduff-tmdb_party-0.2.0 | lib/tmdb_party/movie.rb |