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_shipment

Methods inherited from Spree::Calculator

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

Methods inherited from Base

page, spree_base_scopes

Methods included from Preferences::Preferable

#clear_preferences, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

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