Class: Flattr::Search
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Search
constructor
A new instance of Search.
Methods inherited from Base
#[], lazy_attr_reader, lazy_attr_writer
Constructor Details
#initialize(attrs = {}) ⇒ Search
Returns a new instance of Search.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/flattr/search.rb', line 8 def initialize(attrs={}) if attrs["items"] > 0 items = [] attrs["things"].each do |item| items << Flattr::Thing.new(item) end attrs["things"] = items end super attrs end |