Class: Quotes::Quote

Inherits:
Object
  • Object
show all
Defined in:
lib/quotes.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Quote

Returns a new instance of Quote.



40
41
42
43
44
45
46
# File 'lib/quotes.rb', line 40

def initialize(data)
  data.each do |k, v|
    self.class.class_eval do
      define_method("#{k.downcase}") { v }
    end
  end
end