Sha256: 60c45e88ac21584042331f00f4f9112f873bb0051dcc8815faf7dd49f93a995f

Contents?: true

Size: 302 Bytes

Versions: 1

Compression:

Stored size: 302 Bytes

Contents

module Amzwish
  class Book
    attr_accessor :asin,:title
    def initialize(title, asin)
      @title = title 
      @asin = asin
    end
    
    def ==(other)
      other.respond_to?(:asin) && 
        self.asin == other.asin
    end
    
    def to_s
      "#{title}(#{asin})"
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
amzwish-0.0.0 lib/amzwish/book.rb