Class: Xolphin::Api::Responses::Products
- Defined in:
- lib/xolphin/api/responses/products.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Products
constructor
A new instance of Products.
- #products ⇒ Object
Methods inherited from Base
#_embedded, #error?, #errors, #limit, #message, #page, #pages, #total
Constructor Details
#initialize(data) ⇒ Products
5 6 7 |
# File 'lib/xolphin/api/responses/products.rb', line 5 def initialize(data) super(data) end |
Instance Method Details
#products ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/xolphin/api/responses/products.rb', line 9 def products @products ||= begin products = [] if && ["products"] ["products"].each do |product| products << Product.new(product) end end products end end |