Class: Calculator::FixedAmountSalePriceCalculator
- Inherits:
-
Spree::Calculator
- Object
- Spree::Calculator
- Calculator::FixedAmountSalePriceCalculator
- Defined in:
- app/models/spree/calculator/fixed_amount_sale_price_calculator.rb
Class Method Summary collapse
-
.description ⇒ Object
TODO validate that the sale price is less than the original price.
Instance Method Summary collapse
Class Method Details
.description ⇒ Object
TODO validate that the sale price is less than the original price
4 5 6 |
# File 'app/models/spree/calculator/fixed_amount_sale_price_calculator.rb', line 4 def self.description "Calculates the sale price for a Variant by returning the provided fixed sale price" end |
Instance Method Details
#compute(sale_price) ⇒ Object
8 9 10 |
# File 'app/models/spree/calculator/fixed_amount_sale_price_calculator.rb', line 8 def compute(sale_price) sale_price.value end |