Sha256: 16172d8d7781cbccb0785de60e6b19c76297d34da9c72b0c1023e866adf231d0

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

module FilmBuff
  class Title
    attr_reader :imdb_id, :title, :tagline, :plot, :runtime, :rating, :votes,
      :poster_url, :genres, :release_date

    def initialize(options = {})
      @imdb_id = options["tconst"]
      @title = options["title"]
      @tagline = options["tagline"]
      @plot = options["plot"]["outline"] if options["plot"]
      @runtime = options["runtime"]["time"] if options["runtime"]
      @rating = options["rating"]
      @votes = options["num_votes"]
      @poster_url = options["image"]["url"] if options["image"]
      @genres = options["genres"] || []
      @release_date = options["release_date"]["normal"] if
        options["release_date"]["normal"]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
filmbuff-0.1.5 lib/filmbuff/title.rb