Sha256: 2fc224199983f5fd402548ffe41a95b7e6f74806756bfb07ada9afcb4732c4cb
Contents?: true
Size: 398 Bytes
Versions: 3
Compression:
Stored size: 398 Bytes
Contents
class Libri::Quote attr_accessor :quote, :author @@all = [] def initialize(quote_hash) quote_hash.each { |key, val| send "#{key}=", val } @@all << self end def self.create_from_collection(quotes_array) quotes_array.each { |quote_hash| self.new(quote_hash) } end def self.all @@all end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
libri-0.2.4 | lib/libri/quote.rb |
libri-0.2.3 | lib/libri/quote.rb |
libri-0.2.2 | lib/libri/quote.rb |