Sha256: 4c16a2d52d7b539b1adfd27a55de8d6f46a09b52fc50b4de39439075d159796d

Contents?: true

Size: 293 Bytes

Versions: 8

Compression:

Stored size: 293 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
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
piggybak-0.7.7 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.6 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.5 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.4 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.3 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.2 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.1 app/models/piggybak/shipping_calculator/flat_rate.rb
piggybak-0.7.0 app/models/piggybak/shipping_calculator/flat_rate.rb