Class: Flavordb::Business
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.object_cache ⇒ Object
7 8 9 10 |
# File 'lib/flavordb/business.rb', line 7 def object_cache @object_cache = {} if @object_cache.nil? @object_cache end |
Instance Method Details
#products(opts = {}) ⇒ Object
13 14 15 16 17 |
# File 'lib/flavordb/business.rb', line 13 def products(opts = {}) client = opts[:client] || Flavordb::Client.default_client product_data = client.get_object_data_by_path "#{self.resource}/products" product_data['data'].map {|p| Flavordb::Product.get_or_create p} end |