Class: ConfigKit::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_tokenObject

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_versionObject

Returns the value of attribute api_version.



4
5
6
# File 'lib/config_kit/configuration.rb', line 4

def api_version
  @api_version
end

#debugObject

Returns the value of attribute debug.



4
5
6
# File 'lib/config_kit/configuration.rb', line 4

def debug
  @debug
end

#kindObject

Returns the value of attribute kind.



4
5
6
# File 'lib/config_kit/configuration.rb', line 4

def kind
  @kind
end

#loggerObject

Returns the value of attribute logger.



4
5
6
# File 'lib/config_kit/configuration.rb', line 4

def logger
  @logger
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/config_kit/configuration.rb', line 4

def options
  @options
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/config_kit/configuration.rb', line 4

def url
  @url
end