Class: ProductCatalogue::Manual

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(catalogue, submission_attributes) ⇒ Manual

Returns a new instance of Manual


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

def initialize(catalogue, submission_attributes)
  @product = catalogue.product_with_criteria(submission_attributes[:order_role]) || catalogue.product_with_criteria(nil)
end

Instance Attribute Details

#productObject (readonly)

Returns the value of attribute product


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

def product
  @product
end