class EarthTools::Configuration

The singleton that maintains the configuration settings for plugin.

Constants

OPTIONS

The available options

Public Class Methods

new() click to toggle source
# File lib/earth_tools/configuration.rb, line 33
def initialize  # :nodoc
  set_defaults
end
set_defaults() click to toggle source

Sets the configuration options to the default values

# File lib/earth_tools/configuration.rb, line 71
def set_defaults
  instance.set_defaults
end

Public Instance Methods

set_defaults() click to toggle source

Sets the configuration options to the default values

# File lib/earth_tools/configuration.rb, line 39
def set_defaults
  @timeout      = 3               # Geocoding service timeout (secs)
  @proxy        = nil             # HTTP proxy server (user:pass@host:port)
  @cache        = nil             # Cache object (must respond to #[], #[]=, #keys, and #delete)
  @cache_prefix = "earth_tools:"  # Prefix (string) to use for all cache keys
  
  # Exceptions that should not be rescued by default
  # (if you want to implement custom error handling);
  # supports SocketError and Timeout::Error
  @always_raise = []
  
  # Calculation options
  @units     = :english # :metric or :english
end