Class: Quotes::Quote
- Inherits:
-
Object
- Object
- Quotes::Quote
- Defined in:
- lib/quotes.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Quote
constructor
A new instance of Quote.
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 |