Class: DutyCalculator::Configuration
- Inherits:
-
Object
- Object
- DutyCalculator::Configuration
- Defined in:
- lib/duty_calculator/configuration.rb
Instance Attribute Summary collapse
-
#api_base ⇒ Object
Returns the value of attribute api_base.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_root ⇒ Object
Returns the value of attribute api_root.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_base ⇒ Object
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_key ⇒ Object
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_root ⇒ Object
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_version ⇒ Object
Returns the value of attribute api_version.
7 8 9 |
# File 'lib/duty_calculator/configuration.rb', line 7 def api_version @api_version end |
#debug ⇒ Object
Returns the value of attribute debug.
7 8 9 |
# File 'lib/duty_calculator/configuration.rb', line 7 def debug @debug end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/duty_calculator/configuration.rb', line 7 def logger @logger end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
7 8 9 |
# File 'lib/duty_calculator/configuration.rb', line 7 def sandbox @sandbox end |