Sha256: d8af3b366831964d172ecd1ac716b6f856f76c7941f83be8314f00fba0ff50d5

Contents?: true

Size: 453 Bytes

Versions: 3

Compression:

Stored size: 453 Bytes

Contents

module TMDBParty
  class Image
    attr_reader :url, :type, :size
    
    def initialize(options={})
      @url = options["url"]
      @type = options["type"]
      @size = options["size"]
    end
    
    def self.parse(data)
      puts data.inspect
      puts
      puts
      if data.is_a?(Array)
        data.collect do |image|
          Image.new(image["image"])
        end
      else
        Image.new(image["image"])
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
maksar-tmdb_party-0.4.2 lib/tmdb_party/image.rb
tmdb_party-0.4.1 lib/tmdb_party/image.rb
tmdb_party-0.4.0 lib/tmdb_party/image.rb