Sha256: fe3f1cd0f49cae00665b712180cb6f6ee026bca62f2e3327f1019c0c39c641a3
Contents?: true
Size: 396 Bytes
Versions: 4
Compression:
Stored size: 396 Bytes
Contents
class Libri::Quote attr_accessor :quote, :author @@all = [] def initialize(quote_hash) quote_hash.map { |key, val| send "#{key}=", val } @@all << self end def self.create_from_collection(quotes_array) quotes_array.map { |quote_hash| self.new(quote_hash) } end def self.all @@all end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
libri-0.2.8 | lib/libri/quote.rb |
libri-0.2.7 | lib/libri/quote.rb |
libri-0.2.6 | lib/libri/quote.rb |
libri-0.2.5 | lib/libri/quote.rb |