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.



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

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.



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

def product
  @product
end