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


5
6
7
# File 'app/models/spree/calculator/default_tax.rb', line 5

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

Instance Method Details

#compute(computable) ⇒ Object


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

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