Class: Hola::Cart::Item::Processor
- Inherits:
-
Object
- Object
- Hola::Cart::Item::Processor
- Defined in:
- lib/hola/cart/item/processor.rb
Instance Attribute Summary collapse
-
#product_id ⇒ Object
readonly
Returns the value of attribute product_id.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
Instance Method Summary collapse
-
#initialize(product_id:, quantity:) ⇒ Processor
constructor
A new instance of Processor.
- #perform ⇒ Object
Constructor Details
#initialize(product_id:, quantity:) ⇒ Processor
Returns a new instance of Processor.
16 17 18 19 |
# File 'lib/hola/cart/item/processor.rb', line 16 def initialize(product_id:, quantity:) @product_id = product_id @quantity = quantity end |
Instance Attribute Details
#product_id ⇒ Object (readonly)
Returns the value of attribute product_id.
14 15 16 |
# File 'lib/hola/cart/item/processor.rb', line 14 def product_id @product_id end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
14 15 16 |
# File 'lib/hola/cart/item/processor.rb', line 14 def quantity @quantity end |