Class: Spree::Adjustable::Adjuster::Base
- Inherits:
-
Object
- Object
- Spree::Adjustable::Adjuster::Base
- Defined in:
- app/models/spree/adjustable/adjuster/base.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(adjustable, totals) ⇒ Base
constructor
A new instance of Base.
- #update ⇒ Object
Constructor Details
#initialize(adjustable, totals) ⇒ Base
Returns a new instance of Base.
9 10 11 12 |
# File 'app/models/spree/adjustable/adjuster/base.rb', line 9 def initialize(adjustable, totals) @adjustable = adjustable @totals = totals end |
Class Method Details
.adjust(adjustable, totals) ⇒ Object
5 6 7 |
# File 'app/models/spree/adjustable/adjuster/base.rb', line 5 def self.adjust(adjustable, totals) new(adjustable, totals).update end |
Instance Method Details
#update ⇒ Object
14 15 16 |
# File 'app/models/spree/adjustable/adjuster/base.rb', line 14 def update raise NotImplementedError, "Please implement 'update' in your adjuster: #{self.class.name}" end |