Module: Spree::CalculatedAdjustments
- Extended by:
- ActiveSupport::Concern
- Included in:
- Promotion::Actions::CreateAdjustment, Promotion::Actions::CreateItemAdjustments, ShippingMethod, TaxRate
- Defined in:
- app/models/concerns/spree/calculated_adjustments.rb
Instance Method Summary collapse
Instance Method Details
#calculator_type ⇒ Object
31 32 33 |
# File 'app/models/concerns/spree/calculated_adjustments.rb', line 31 def calculator_type calculator.class.to_s if calculator end |
#calculator_type=(calculator_type) ⇒ Object
35 36 37 38 |
# File 'app/models/concerns/spree/calculated_adjustments.rb', line 35 def calculator_type=(calculator_type) klass = calculator_type.constantize if calculator_type self.calculator = klass.new if klass && !calculator.instance_of?(klass) end |