Sha256: c0da24cd6f51875c3447a28ed9fc4d9dc2b0d7206ad57026083b41afc2064c3a

Contents?: true

Size: 326 Bytes

Versions: 2

Compression:

Stored size: 326 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

2 entries across 2 versions & 1 rubygems

Version Path
active_shipping-0.12.6 lib/active_shipping/shipping/base.rb
active_shipping-0.12.5 lib/active_shipping/shipping/base.rb