Sha256: 649b8511ef06bed0ffa692719e9c00f51cb7c3f6e9a8ddcdddfe4d749d3f6cac

Contents?: true

Size: 850 Bytes

Versions: 2

Compression:

Stored size: 850 Bytes

Contents

module Thanos
  class Comic
    attr_reader :id, :title, :description, :format, :resource_uri,
      :issue_number, :ean, :isbn, :upc, :issn, :page_count,
      :digital_id, :diamond_code, :variant_description, :dates,
      :urls, :thumbnail, :text_objects, :images, :prices,
      :stories, :creators, :series, :events, :characters

    def initialize(args)
      @series = args[:series]
      @stories = args[:stories]
      @creators = args[:creators]
      @events = args[:events]
      @characters = args[:characters]
      @urls = args[:urls]
      @prices = args[:prices]
      @images = args[:images]
      @thumbnail = args[:thumbnail]
      @text_objects = args[:text_objects]
      @dates = args[:dates]

      args[:attributes].each do |attribute, value|
        instance_variable_set("@#{attribute}", value)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thanos-0.6.0 lib/thanos/resources/comic.rb
thanos-0.5.0 lib/thanos/resources/comic.rb