Class: Qube::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/qube/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



22
23
24
25
26
27
28
29
30
# File 'lib/qube/config.rb', line 22

def initialize
  @api_uri      = ENV['QUBE_API_URI']   || 'http://localhost:9191/qube/api/v1'
  @api_token    = ENV['QUBE_API_TOKEN'] || '77c04ced3f915240d0c5d8d5819f84c7'   # bash: md5 -s qube
  @timeout      = 2
  @user_agent   = 'QubeRubyClient'
  @logger       = ::Logger.new STDOUT
  @logger.level = @logger_level
  @http_debug   = true
end

Instance Attribute Details

#api_tokenObject

Returns the value of attribute api_token.



16
17
18
# File 'lib/qube/config.rb', line 16

def api_token
  @api_token
end

#api_uriObject

Returns the value of attribute api_uri.



15
16
17
# File 'lib/qube/config.rb', line 15

def api_uri
  @api_uri
end

#loggerObject

Returns the value of attribute logger.



19
20
21
# File 'lib/qube/config.rb', line 19

def logger
  @logger
end

#logger_levelObject

Returns the value of attribute logger_level.



20
21
22
# File 'lib/qube/config.rb', line 20

def logger_level
  @logger_level
end

#timeoutObject

Returns the value of attribute timeout.



17
18
19
# File 'lib/qube/config.rb', line 17

def timeout
  @timeout
end

#user_agentObject

Returns the value of attribute user_agent.



18
19
20
# File 'lib/qube/config.rb', line 18

def user_agent
  @user_agent
end