Class: FDDB::Items
Instance Method Summary collapse
- #get_ingredients(query = nil) ⇒ Object
-
#initialize(xml_data) ⇒ Items
constructor
A new instance of Items.
Methods included from Parser
Constructor Details
#initialize(xml_data) ⇒ Items
Returns a new instance of Items.
6 7 8 |
# File 'lib/fddb/items.rb', line 6 def initialize (xml_data) create_items((parse xml_data)['result']['item']) end |
Instance Method Details
#get_ingredients(query = nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/fddb/items.rb', line 10 def get_ingredients (query = nil) result = [] @items.each do |item| result << (item.get_ingredients query) end result end |