Class: Flavordb::Product
Instance Attribute Summary collapse
-
#business_id ⇒ Object
readonly
Returns the value of attribute business_id.
-
#product_category_id ⇒ Object
readonly
Returns the value of attribute product_category_id.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Instance Attribute Details
#business_id ⇒ Object (readonly)
Returns the value of attribute business_id.
5 6 7 |
# File 'lib/flavordb/product.rb', line 5 def business_id @business_id end |
#product_category_id ⇒ Object (readonly)
Returns the value of attribute product_category_id.
5 6 7 |
# File 'lib/flavordb/product.rb', line 5 def product_category_id @product_category_id end |
Class Method Details
.object_cache ⇒ Object
7 8 9 10 |
# File 'lib/flavordb/product.rb', line 7 def object_cache @object_cache = {} if @object_cache.nil? @object_cache end |
Instance Method Details
#business(opts = {}) ⇒ Object
13 14 15 16 |
# File 'lib/flavordb/product.rb', line 13 def business(opts={}) client = opts[:client] || Flavordb::Client.default_client client.get_business(business_id) end |
#product_category(opts = {}) ⇒ Object
18 19 20 21 |
# File 'lib/flavordb/product.rb', line 18 def product_category(opts={}) client = opts[:client] || Flavordb::Client.default_client client.get_product_category(product_category_id) end |