Class: ProductCatalogue::SingleProduct

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

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#productObject (readonly)

Returns the value of attribute product.


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

def product
  @product
end