Class: DutyCalculator::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



10
11
12
13
14
15
16
17
# File 'lib/duty_calculator/configuration.rb', line 10

def initialize
  defaults = load_defaults
  @api_root = defaults[:api_root]
  @api_version = defaults[:api_version]
  @sandbox = defaults[:sandbox]
  @debug = defaults[:debug]
  @logger = ::Logger.new(STDOUT)
end

Instance Attribute Details

#api_baseObject

Returns the value of attribute api_base.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def api_base
  @api_base
end

#api_keyObject

Returns the value of attribute api_key.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def api_key
  @api_key
end

#api_rootObject

Returns the value of attribute api_root.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def api_root
  @api_root
end

#api_versionObject

Returns the value of attribute api_version.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def api_version
  @api_version
end

#debugObject

Returns the value of attribute debug.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def debug
  @debug
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def logger
  @logger
end

#sandboxObject

Returns the value of attribute sandbox.



7
8
9
# File 'lib/duty_calculator/configuration.rb', line 7

def sandbox
  @sandbox
end