Class: Qube::Config
- Inherits:
-
Object
- Object
- Qube::Config
- Defined in:
- lib/qube/config.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
Returns the value of attribute api_token.
-
#api_uri ⇒ Object
Returns the value of attribute api_uri.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#logger_level ⇒ Object
Returns the value of attribute logger_level.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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_token ⇒ Object
Returns the value of attribute api_token.
16 17 18 |
# File 'lib/qube/config.rb', line 16 def api_token @api_token end |
#api_uri ⇒ Object
Returns the value of attribute api_uri.
15 16 17 |
# File 'lib/qube/config.rb', line 15 def api_uri @api_uri end |
#logger ⇒ Object
Returns the value of attribute logger.
19 20 21 |
# File 'lib/qube/config.rb', line 19 def logger @logger end |
#logger_level ⇒ Object
Returns the value of attribute logger_level.
20 21 22 |
# File 'lib/qube/config.rb', line 20 def logger_level @logger_level end |
#timeout ⇒ Object
Returns the value of attribute timeout.
17 18 19 |
# File 'lib/qube/config.rb', line 17 def timeout @timeout end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
18 19 20 |
# File 'lib/qube/config.rb', line 18 def user_agent @user_agent end |