Sha256: 6846d166b30f8affe62b423d4eaee44531e157a40640463fc3745bacbec3d7e6

Contents?: true

Size: 342 Bytes

Versions: 3

Compression:

Stored size: 342 Bytes

Contents

module ARBookFinder
  class Publisher
    attr_reader :name, :lccn, :isbn, :year_published,
                :page_count

    def initialize(parsed_data)
      load(parsed_data)
    end

    private
    def load(parsed_data)
      parsed_data.keys.each do |k|
        instance_variable_set("@#{k}", parsed_data[k])
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ar_book_finder-1.1.1 lib/ar_book_finder/publisher.rb
ar_book_finder-1.1.0 lib/ar_book_finder/publisher.rb
ar_book_finder-1.0.0 lib/ar_book_finder/publisher.rb