Class: Spree::ShippingCalculator

Inherits:
Calculator show all
Defined in:
app/models/spree/shipping_calculator.rb

Instance Method Summary collapse

Methods inherited from Calculator

#compute, description, #description, #to_s

Methods inherited from Base

display_includes

Methods included from Core::Permalinks

#generate_permalink, #save_permalink

Instance Method Details

#available?(_package) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/models/spree/shipping_calculator.rb', line 9

def available?(_package)
  true
end

#compute_package(_package) ⇒ Object

Raises:

  • (NotImplementedError)


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

def compute_package(_package)
  raise NotImplementedError, "Please implement 'compute_package(package)' in your calculator: #{self.class.name}"
end