Class: AppnexusApi::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/appnexusapi/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
# File 'lib/appnexusapi/configuration.rb', line 5

def initialize
  @api_debug = ENV['APPNEXUS_API_DEBUG'].to_s =~ /^(true|t|yes|y|1)$/i
  @logger = Logger.new(STDOUT).tap do |logger|
    @api_debug ? logger.level = Logger::DEBUG : logger.level = Logger::INFO
  end
end

Instance Attribute Details

#api_debugObject

Returns the value of attribute api_debug.



3
4
5
# File 'lib/appnexusapi/configuration.rb', line 3

def api_debug
  @api_debug
end

#loggerObject

Returns the value of attribute logger.



3
4
5
# File 'lib/appnexusapi/configuration.rb', line 3

def logger
  @logger
end