Class: Spree::Calculator::FlatRate

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Spree::Calculator

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

Class Method Details

.descriptionObject



10
11
12
# File 'app/models/spree/calculator/flat_rate.rb', line 10

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

Instance Method Details

#compute(object = nil) ⇒ Object



14
15
16
# File 'app/models/spree/calculator/flat_rate.rb', line 14

def compute(object=nil)
  self.preferred_amount
end