module Minfraud

This class holds global configuration parameters and provides a namespace for the gem's classes.

rubocop:disable Metrics/ModuleLength

Constants

VERSION

The Gem version.

Attributes

account_id[RW]

The MaxMind account ID that is used for authorization.

@return [Integer, nil]

connection[R]

@!visibility private

enable_validation[RW]

Enable client side validation. This is disabled by default.

@return [Boolean, nil]

host[RW]

The host to use when connecting to the web service.

@return [String, nil]

license_key[RW]

The MaxMind license key that is used for authorization.

@return [String, nil]

user_id[RW]

The MaxMind account ID that is used for authorization.

@deprecated Use {::account_id} instead. This will be removed in the next

major version.

@return [Integer, nil]

Public Class Methods

configuration() click to toggle source

The current Minfraud configuration.

@deprecated This will be removed in the next major version.

@return [Hash]

# File lib/minfraud.rb, line 82
def configuration
  {
    user_id:     @user_id,
    license_key: @license_key
  }
end
configure() { |self| ... } click to toggle source

Yield self to accept configuration settings.

@yield [self]

# File lib/minfraud.rb, line 70
def configure
  yield self

  config      = Minfraud::HTTPService.configuration
  @connection = Faraday.new(config[:server], {}, &config[:middleware])
end