Class: ProductCatalogue::SingleProduct

Inherits:
Object
  • Object
show all
Defined in:
app/models/product_catalogue/single_product.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(catalogue, _submission_attributes) ⇒ SingleProduct

Returns a new instance of SingleProduct


4
5
6
# File 'app/models/product_catalogue/single_product.rb', line 4

def initialize(catalogue, _submission_attributes)
  @product = catalogue.products.first
end

Instance Attribute Details

#productObject (readonly)

Returns the value of attribute product


2
3
4
# File 'app/models/product_catalogue/single_product.rb', line 2

def product
  @product
end