Class: Spree::Calculator::FreeShipping
Class Method Summary
collapse
Instance Method Summary
collapse
#available?, calculators, #description, register, #to_s
Class Method Details
.description ⇒ Object
3
4
5
|
# File 'app/models/spree/calculator/free_shipping.rb', line 3
def self.description
Spree.t(:free_shipping)
end
|
Instance Method Details
#compute(object) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'app/models/spree/calculator/free_shipping.rb', line 7
def compute(object)
if object.is_a?(Array)
return if object.empty?
order = object.first.order
else
order = object
end
order.ship_total
end
|