Class: Workarea::Orderbot::ParentProduct
- Inherits:
-
Object
- Object
- Workarea::Orderbot::ParentProduct
- Includes:
- Filters
- Defined in:
- app/services/workarea/orderbot/parent_product.rb
Instance Attribute Summary collapse
-
#parent_product ⇒ Object
readonly
Returns the value of attribute parent_product.
Instance Method Summary collapse
-
#initialize(parent_product) ⇒ ParentProduct
constructor
A new instance of ParentProduct.
- #process ⇒ Object
Methods included from Filters
#add_filter_values, #first_variable, #second_variable
Constructor Details
#initialize(parent_product) ⇒ ParentProduct
Returns a new instance of ParentProduct.
8 9 10 |
# File 'app/services/workarea/orderbot/parent_product.rb', line 8 def initialize(parent_product) @parent_product = parent_product end |
Instance Attribute Details
#parent_product ⇒ Object (readonly)
Returns the value of attribute parent_product.
6 7 8 |
# File 'app/services/workarea/orderbot/parent_product.rb', line 6 def parent_product @parent_product end |
Instance Method Details
#process ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/services/workarea/orderbot/parent_product.rb', line 12 def process product.name = product_details[:name] product.description = product_details[:description] product.active = product_details[:active] product.filters = build_product_filters product.template = product_template set_details product.save! end |