Class: Rager::Config
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#http_adapter ⇒ Object
Returns the value of attribute http_adapter.
-
#log_raise ⇒ Object
Returns the value of attribute log_raise.
-
#log_strategy ⇒ Object
Returns the value of attribute log_strategy.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
32 33 34 35 36 37 38 39 40 |
# File 'lib/rager/config.rb', line 32 def initialize @logger = T.let(::Logger.new($stdout), ::Logger) @log_raise = T.let(false, T::Boolean) @log_strategy = T.let(Rager::LogStrategy::None, Rager::LogStrategy) @http_adapter = T.let(Rager::Http::Adapters::NetHttp.new, Rager::Http::Adapters::Abstract) @url = T.let(nil, T.nilable(String)) @api_key = T.let(nil, T.nilable(String)) @timeout = T.let(nil, T.nilable(Numeric)) end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
26 27 28 |
# File 'lib/rager/config.rb', line 26 def api_key @api_key end |
#http_adapter ⇒ Object
Returns the value of attribute http_adapter.
20 21 22 |
# File 'lib/rager/config.rb', line 20 def http_adapter @http_adapter end |
#log_raise ⇒ Object
Returns the value of attribute log_raise.
14 15 16 |
# File 'lib/rager/config.rb', line 14 def log_raise @log_raise end |
#log_strategy ⇒ Object
Returns the value of attribute log_strategy.
17 18 19 |
# File 'lib/rager/config.rb', line 17 def log_strategy @log_strategy end |
#logger ⇒ Object
Returns the value of attribute logger.
11 12 13 |
# File 'lib/rager/config.rb', line 11 def logger @logger end |
#timeout ⇒ Object
Returns the value of attribute timeout.
29 30 31 |
# File 'lib/rager/config.rb', line 29 def timeout @timeout end |
#url ⇒ Object
Returns the value of attribute url.
23 24 25 |
# File 'lib/rager/config.rb', line 23 def url @url end |