Class: Corzinus::Checkout::DeliveryStep
- Inherits:
-
Rectify::Command
- Object
- Rectify::Command
- Corzinus::Checkout::DeliveryStep
- Defined in:
- app/commands/corzinus/checkout/delivery_step.rb
Instance Attribute Summary collapse
-
#delivery_id ⇒ Object
readonly
Returns the value of attribute delivery_id.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ DeliveryStep
constructor
A new instance of DeliveryStep.
Constructor Details
#initialize(options) ⇒ DeliveryStep
Returns a new instance of DeliveryStep.
6 7 8 9 |
# File 'app/commands/corzinus/checkout/delivery_step.rb', line 6 def initialize() @order = [:order] @delivery_id = [:params][:delivery_id] end |
Instance Attribute Details
#delivery_id ⇒ Object (readonly)
Returns the value of attribute delivery_id.
4 5 6 |
# File 'app/commands/corzinus/checkout/delivery_step.rb', line 4 def delivery_id @delivery_id end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
4 5 6 |
# File 'app/commands/corzinus/checkout/delivery_step.rb', line 4 def order @order end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/commands/corzinus/checkout/delivery_step.rb', line 11 def call if delivery_id_valid? && order_update broadcast :valid else broadcast :invalid end end |