Class: Underpass::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/underpass/configuration.rb

Overview

Stores configuration options for the Underpass library.

Examples:

Underpass.configure do |config|
  config.api_endpoint = 'https://overpass.kumi.systems/api/interpreter'
  config.timeout = 30
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
# File 'lib/underpass/configuration.rb', line 18

def initialize
  @api_endpoint = 'https://overpass-api.de/api/interpreter'
  @timeout = 25
end

Instance Attribute Details

#api_endpointString

Returns the Overpass API endpoint URL.

Returns:

  • (String)

    the Overpass API endpoint URL



13
14
15
# File 'lib/underpass/configuration.rb', line 13

def api_endpoint
  @api_endpoint
end

#timeoutInteger

Returns the query timeout in seconds.

Returns:

  • (Integer)

    the query timeout in seconds



16
17
18
# File 'lib/underpass/configuration.rb', line 16

def timeout
  @timeout
end