Class: Spree::Calculator::Shipping::FlatRate

Inherits:
ShippingCalculator show all
Defined in:
app/models/spree/calculator/shipping/flat_rate.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ShippingCalculator

#available?, #compute

Methods inherited from Spree::Calculator

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

Class Method Details

.descriptionObject


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

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

Instance Method Details

#compute_package(package) ⇒ Object


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

def compute_package(package)
  self.preferred_amount
end