Class: Underpass::Configuration
- Inherits:
-
Object
- Object
- Underpass::Configuration
- Defined in:
- lib/underpass/configuration.rb
Overview
Stores configuration options for the Underpass library.
Instance Attribute Summary collapse
-
#api_endpoint ⇒ String
The Overpass API endpoint URL.
-
#max_retries ⇒ Integer
Maximum number of retry attempts for rate limiting and timeouts.
-
#timeout ⇒ Integer
The query timeout in seconds.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 |
# File 'lib/underpass/configuration.rb', line 22 def initialize @api_endpoint = 'https://overpass-api.de/api/interpreter' @timeout = 25 @max_retries = 3 end |
Instance Attribute Details
#api_endpoint ⇒ String
Returns the Overpass API endpoint URL.
14 15 16 |
# File 'lib/underpass/configuration.rb', line 14 def api_endpoint @api_endpoint end |
#max_retries ⇒ Integer
Returns maximum number of retry attempts for rate limiting and timeouts.
20 21 22 |
# File 'lib/underpass/configuration.rb', line 20 def max_retries @max_retries end |
#timeout ⇒ Integer
Returns the query timeout in seconds.
17 18 19 |
# File 'lib/underpass/configuration.rb', line 17 def timeout @timeout end |