Class: ConfigKit::Configuration
- Inherits:
-
Object
- Object
- ConfigKit::Configuration
- Defined in:
- lib/config_kit/configuration.rb
Instance Attribute Summary collapse
-
#acl_token ⇒ Object
Returns the value of attribute acl_token.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#options ⇒ Object
Returns the value of attribute options.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, opts = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(url, opts = {}) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/config_kit/configuration.rb', line 5 def initialize(url, opts={}) @url = url @opts = opts @acl_token = opts[:acl_token] @api_version = 'v1.0' @kind = 'config_kit' @logger = @opts.fetch(:logger, ::Logger.new(STDOUT)) @debug = @opts[:debug] || false @logger.level = ::Logger::DEBUG if @debug end |
Instance Attribute Details
#acl_token ⇒ Object
Returns the value of attribute acl_token.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def acl_token @acl_token end |
#api_version ⇒ Object
Returns the value of attribute api_version.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def api_version @api_version end |
#debug ⇒ Object
Returns the value of attribute debug.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def debug @debug end |
#kind ⇒ Object
Returns the value of attribute kind.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def kind @kind end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def logger @logger end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def @options end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/config_kit/configuration.rb', line 4 def url @url end |