Sha256: dc8a828b68c0e38168737675fc489582f24079a326a3a606bef7c6a60cb24d72

Contents?: true

Size: 433 Bytes

Versions: 3

Compression:

Stored size: 433 Bytes

Contents

class Libri::Book
    attr_accessor :title_by_author, :blurbs_and_plot, :about_author,:excerpt,  :availability, :url, :book

    @@all = []

    def initialize(book_info_hash) 
        book_info_hash.map { |key, val|
            send "#{key}=", val
        }
        @@all << self
    end

    def self.create_from_collection(book_info_hash)
        self.new(book_info_hash)
    end
    
    def self.all
        @@all
    end 

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libri-0.2.8 lib/libri/book.rb
libri-0.2.7 lib/libri/book.rb
libri-0.2.6 lib/libri/book.rb