Class: Elessar::ElessarConfiguration
- Inherits:
-
Object
- Object
- Elessar::ElessarConfiguration
- Defined in:
- lib/elessar/elessar_configuration.rb
Instance Attribute Summary collapse
-
#api_base ⇒ Object
Returns the value of attribute api_base.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#max_network_retries ⇒ Object
Returns the value of attribute max_network_retries.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ElessarConfiguration
constructor
A new instance of ElessarConfiguration.
Constructor Details
#initialize ⇒ ElessarConfiguration
Returns a new instance of ElessarConfiguration.
19 20 21 22 23 24 25 26 |
# File 'lib/elessar/elessar_configuration.rb', line 19 def initialize @max_network_retries = 0 @open_timeout = 30 @read_timeout = 80 @api_base = "https://the-one-api.dev/v2/" end |
Instance Attribute Details
#api_base ⇒ Object
Returns the value of attribute api_base.
8 9 10 |
# File 'lib/elessar/elessar_configuration.rb', line 8 def api_base @api_base end |
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/elessar/elessar_configuration.rb', line 5 def api_key @api_key end |
#api_version ⇒ Object
Returns the value of attribute api_version.
6 7 8 |
# File 'lib/elessar/elessar_configuration.rb', line 6 def api_version @api_version end |
#max_network_retries ⇒ Object
Returns the value of attribute max_network_retries.
9 10 11 |
# File 'lib/elessar/elessar_configuration.rb', line 9 def max_network_retries @max_network_retries end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
10 11 12 |
# File 'lib/elessar/elessar_configuration.rb', line 10 def open_timeout @open_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
11 12 13 |
# File 'lib/elessar/elessar_configuration.rb', line 11 def read_timeout @read_timeout end |
Class Method Details
.setup ⇒ Object
13 14 15 16 17 |
# File 'lib/elessar/elessar_configuration.rb', line 13 def self.setup new.tap do |instance| yield(instance) if block_given? end end |