Module: Workarea::GuardNegativePrice
- Included in:
- Payment::Tender, Pricing::TaxApplication, ShippingOption
- Defined in:
- app/models/workarea/guard_negative_price.rb
Instance Method Summary collapse
Instance Method Details
#guard_negative_price ⇒ Object
2 3 4 5 |
# File 'app/models/workarea/guard_negative_price.rb', line 2 def guard_negative_price result = yield || 0.to_money 0.to_money > result ? 0.to_money : result end |