Sha256: ffe74a2fba7f6b884f8fcd7c8d2f07a60c6582b10da62d2c7128c1c150b31ce6

Contents?: true

Size: 526 Bytes

Versions: 103

Compression:

Stored size: 526 Bytes

Contents

module ActiveMerchant
  module Billing
    autoload :Gateway, 'active_merchant/billing/gateway'
        
    Dir[File.dirname(__FILE__) + '/gateways/**/*.rb'].each do |f|      
      
      # Get camelized class name 
      filename = File.basename(f, '.rb')
      # Add _gateway suffix
      gateway_name = filename + '_gateway'
      # Camelize the string to get the class name
      gateway_class = gateway_name.camelize      
      
      # Register for autoloading
      autoload gateway_class, f      
    end
  end
end

Version data entries

103 entries across 103 versions & 25 rubygems

Version Path
glebm-activemerchant-1.7.2.1 lib/active_merchant/billing/gateways.rb
activemerchant-1.7.2 lib/active_merchant/billing/gateways.rb
projectdx_activemerchant-1.7.1.20100817.3 lib/active_merchant/billing/gateways.rb
projectdx_activemerchant-1.7.1.20100817.2 lib/active_merchant/billing/gateways.rb
projectdx_activemerchant-1.7.1.20100817.1 lib/active_merchant/billing/gateways.rb
humanzz-activemerchant-1.7.1.1 lib/active_merchant/billing/gateways.rb
humanzz-activemerchant-1.7.1 lib/active_merchant/billing/gateways.rb
smulube-activemerchant-1.7.1 lib/active_merchant/billing/gateways.rb
smulube-activemerchant-1.7.0.3 lib/active_merchant/billing/gateways.rb
activemerchant-1.7.1 lib/active_merchant/billing/gateways.rb
johnreitano-activemerchant-1.5.8 lib/active_merchant/billing/gateways.rb
smulube-activemerchant-1.7.0.2 lib/active_merchant/billing/gateways.rb
smulube-activemerchant-1.7.0.1 lib/active_merchant/billing/gateways.rb
johnreitano-activemerchant-1.5.7 lib/active_merchant/billing/gateways.rb
smulube-activemerchant-1.7.0 lib/active_merchant/billing/gateways.rb
activemerchant-1.7.0 lib/active_merchant/billing/gateways.rb
activemerchant-1.6.0 lib/active_merchant/billing/gateways.rb
bitfluent-activemerchant-1.5.1.1 lib/active_merchant/billing/gateways.rb
johnreitano-activemerchant-1.5.5 lib/active_merchant/billing/gateways.rb
johnreitano-activemerchant-1.5.4 lib/active_merchant/billing/gateways.rb