Class: Rager::Config

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/rager/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



26
27
28
29
30
31
32
33
# File 'lib/rager/config.rb', line 26

def initialize
  @http_adapter = T.let(nil, T.nilable(Rager::Http::Adapters::Abstract))
  @logger_type = T.let(nil, T.nilable(Rager::Logger))
  @logger = T.let(::Logger.new($stdout), ::Logger)
  @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_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

#http_adapterObject



36
37
38
# File 'lib/rager/config.rb', line 36

def http_adapter
  @http_adapter ||= default_http_adapter
end

#loggerObject

Returns the value of attribute logger.



14
15
16
# File 'lib/rager/config.rb', line 14

def logger
  @logger
end

#logger_typeObject

Returns the value of attribute logger_type.



11
12
13
# File 'lib/rager/config.rb', line 11

def logger_type
  @logger_type
end

#timeoutObject

Returns the value of attribute timeout.



23
24
25
# File 'lib/rager/config.rb', line 23

def timeout
  @timeout
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end