Class: ProductCatalogue::SingleProduct
- Inherits:
-
Object
- Object
- ProductCatalogue::SingleProduct
- Defined in:
- app/models/product_catalogue/single_product.rb
Instance Attribute Summary collapse
-
#product ⇒ Object
readonly
Returns the value of attribute product.
Instance Method Summary collapse
-
#initialize(catalogue, _submission_attributes) ⇒ SingleProduct
constructor
A new instance of SingleProduct.
Constructor Details
#initialize(catalogue, _submission_attributes) ⇒ SingleProduct
Returns a new instance of SingleProduct.
5 6 7 |
# File 'app/models/product_catalogue/single_product.rb', line 5 def initialize(catalogue, _submission_attributes) @product = catalogue.products.first end |
Instance Attribute Details
#product ⇒ Object (readonly)
Returns the value of attribute product.
3 4 5 |
# File 'app/models/product_catalogue/single_product.rb', line 3 def product @product end |