Sha256: 831f6bdfe8d223161388e9b53d45592568003aa0734b61a6381599933c3ad45c

Contents?: true

Size: 298 Bytes

Versions: 34

Compression:

Stored size: 298 Bytes

Contents

module Piggybak
  class ShippingCalculator::FlatRate
    KEYS = ["rate"]

    def self.description
      "Flat Rate"
    end

    def self.available?(*args)
      true
    end

    def self.rate(method, object)
      method.metadata.detect { |m| m.key == "rate" }.value.to_f.to_c
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
piggybak-0.6.34 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.33 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.32 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.31 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.30 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.29 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.28 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.27 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.26 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.25 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.24 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.23 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.22 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.21 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.20 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.19 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.18 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.17 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.16 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.6.15 app/models/piggybak/shipping_calculator/flat_rate.rb