require 'hamburglar/errors'

module Hamburglar
  autoload :Version,  'hamburglar/version'
  autoload :Report,   'hamburglar/report'
  autoload :Gateways, 'hamburglar/gateways'

  GATEWAYS = [:max_mind, :fraud_guardian].freeze

  class << self
    # The current gateway
    attr_reader :gateway

    # Authorization credentials for the gateway in use
    attr_accessor :credentials
  end

  # Set the gateway to be used for fraud reports
  def self.gateway=(gateway)
    unless GATEWAYS.include? gateway
      raise InvalidGateway, gateway
    end
    @gateway = gateway
  end
end

require 'hamburglar/errors'

module Hamburglar
  autoload :Version,  'hamburglar/version'
  autoload :Report,   'hamburglar/report'
  autoload :Gateways, 'hamburglar/gateways'

  GATEWAYS = [:max_mind].freeze

  class << self
    # The current gateway
    attr_reader :gateway

    # Authorization credentials for the gateway in use
    attr_accessor :credentials
  end

  # Set the gateway to be used for fraud reports
  def self.gateway=(gateway)
    unless GATEWAYS.include? gateway
      raise InvalidGateway, gateway
    end
    @gateway = gateway
  end

  self.gateway = :max_mind
end

Make Hamburglar default to MaxMind until FraudGuardian is added
Make Hamburglar default to MaxMind until FraudGuardian is added