Sha256: 1c84df7821eaf932ad3ccf0551c32adf53c6eccd35275f639549bdfe66c7f770
Contents?: true
Size: 557 Bytes
Versions: 43
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true module Spree class ShippingCalculator < Calculator def compute_shipment(_shipment) raise NotImplementedError, "Please implement 'compute_shipment(shipment)' in your calculator: #{self.class.name}" end def compute_package(_package) raise NotImplementedError, "Please implement 'compute_package(package)' in your calculator: #{self.class.name}" end def available?(_package) true end private def total(content_items) content_items.map(&:amount).sum end end end
Version data entries
43 entries across 43 versions & 2 rubygems