Class: SearchApi::Configuration
- Inherits:
-
Object
- Object
- SearchApi::Configuration
- Defined in:
- lib/searchapi/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#retries ⇒ Object
Returns the value of attribute retries.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 |
# File 'lib/searchapi/configuration.rb', line 7 def initialize @api_key = ENV["SEARCHAPI_API_KEY"] @base_url = "https://www.searchapi.io/api/v1" @timeout = 30 @retries = 2 @logger = nil end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/searchapi/configuration.rb', line 5 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/searchapi/configuration.rb', line 5 def base_url @base_url end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/searchapi/configuration.rb', line 5 def logger @logger end |
#retries ⇒ Object
Returns the value of attribute retries.
5 6 7 |
# File 'lib/searchapi/configuration.rb', line 5 def retries @retries end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/searchapi/configuration.rb', line 5 def timeout @timeout end |