Sha256: cce46b47b9d84959b40a74b418918eaa071ff8240518858d5c851175c8c5615b

Contents?: true

Size: 330 Bytes

Versions: 30

Compression:

Stored size: 330 Bytes

Contents

module ActiveMerchant
  module Shipping
    module Base
      mattr_accessor :mode
      self.mode = :production
      
      def self.carrier(name)
        ActiveMerchant::Shipping::Carriers.all.find {|c| c.name.downcase == name.to_s.downcase} ||
          raise(NameError, "unknown carrier #{name}")
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
active_shipping-0.12.4 lib/active_shipping/shipping/base.rb
active_shipping-0.12.3 lib/active_shipping/shipping/base.rb
active_shipping-0.12.2 lib/active_shipping/shipping/base.rb
active_shipping-0.12.1 lib/active_shipping/shipping/base.rb
active_shipping-0.12.0 lib/active_shipping/shipping/base.rb
active_shipping-0.11.2 lib/active_shipping/shipping/base.rb
active_shipping-0.11.1 lib/active_shipping/shipping/base.rb
active_shipping-0.11.0 lib/active_shipping/shipping/base.rb
active_shipping-0.10.1 lib/active_shipping/shipping/base.rb
active_shipping-0.10.0 lib/active_shipping/shipping/base.rb
active_shipping-0.9.15 lib/active_shipping/shipping/base.rb
kschadeck-active_shipping-0.9.15 lib/active_shipping/shipping/base.rb
active_shipping-0.9.14 lib/active_shipping/shipping/base.rb
rclements_active_shipping-0.9.15 lib/active_shipping/shipping/base.rb
rclements_active_shipping-0.9.14 lib/active_shipping/shipping/base.rb
rclements_active_shipping-0.9.13 lib/active_shipping/shipping/base.rb
benhutton-active_shipping-0.9.13 lib/active_shipping/shipping/base.rb
active_shipping-0.9.13 lib/active_shipping/shipping/base.rb
active_shipping-0.9.12 lib/active_shipping/shipping/base.rb
active_shipping-0.9.11 lib/active_shipping/shipping/base.rb