class Libri::Quote
Attributes
quote[RW]
Public Class Methods
all()
click to toggle source
# File lib/libri/quote.rb, line 19 def self.all @@all end
create_from_collection(quotes_array)
click to toggle source
# File lib/libri/quote.rb, line 13 def self.create_from_collection(quotes_array) quotes_array.map { |quote_hash| self.new(quote_hash) } end
new(quote_hash)
click to toggle source
# File lib/libri/quote.rb, line 6 def initialize(quote_hash) quote_hash.map { |key, val| send "#{key}=", val } @@all << self end