Class: Spree::Calculator::DefaultTax

Inherits:
Spree::Calculator show all
Defined in:
app/models/spree/calculator/default_tax.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Spree::Calculator

#available?, calculators, #description, register, #to_s

Class Method Details

.descriptionObject



3
4
5
# File 'app/models/spree/calculator/default_tax.rb', line 3

def self.description
  I18n.t(:default_tax)
end

Instance Method Details

#compute(computable) ⇒ Object



7
8
9
10
11
12
13
14
# File 'app/models/spree/calculator/default_tax.rb', line 7

def compute(computable)
  case computable
    when Spree::Order
      compute_order(computable)
    when Spree::LineItem
      compute_line_item(computable)
  end
end