Class: AppnexusApi::Configuration
- Inherits:
-
Object
- Object
- AppnexusApi::Configuration
- Defined in:
- lib/appnexusapi/configuration.rb
Instance Attribute Summary collapse
-
#api_debug ⇒ Object
Returns the value of attribute api_debug.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_debug ⇒ Object
Returns the value of attribute api_debug.
3 4 5 |
# File 'lib/appnexusapi/configuration.rb', line 3 def api_debug @api_debug end |
#logger ⇒ Object
Returns the value of attribute logger.
3 4 5 |
# File 'lib/appnexusapi/configuration.rb', line 3 def logger @logger end |