Module: GoogleMapsService

Defined in:
lib/google_maps_service.rb,
lib/google_maps_service/url.rb,
lib/google_maps_service/apis.rb,
lib/google_maps_service/client.rb,
lib/google_maps_service/errors.rb,
lib/google_maps_service/convert.rb,
lib/google_maps_service/version.rb,
lib/google_maps_service/polyline.rb,
lib/google_maps_service/validator.rb

Overview

Google Maps Web Service API.

Defined Under Namespace

Modules: Apis, Convert, Error, Polyline, Url, Validator Classes: Client

Constant Summary collapse

VERSION =

GoogleMapsService gem version

"0.6.3"
OS_VERSION =

Current operating system

begin
  if RUBY_PLATFORM.match?(/mswin|win32|mingw|bccwin|cygwin/)
    `ver`.sub(/\s*\[Version\s*/, "/").sub("]", "").strip
  elsif RUBY_PLATFORM.match?(/darwin/i)
    "Mac OS X/#{`sw_vers -productVersion`}".strip
  elsif RUBY_PLATFORM == "java"
    require "java"
    name = java.lang.System.getProperty("os.name")
    version = java.lang.System.getProperty("os.version")
    "#{name}/#{version}".strip
  else
    `uname -sr`.sub(" ", "/").strip
  end
rescue
  RUBY_PLATFORM
end

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.client_idString

Global client_id.

Returns:

  • (String)

See Also:



12
13
14
# File 'lib/google_maps_service.rb', line 12

def client_id
  @client_id
end

.client_secretString

Global client_secret.

Returns:

  • (String)

See Also:



17
18
19
# File 'lib/google_maps_service.rb', line 17

def client_secret
  @client_secret
end

.keyString

Global key.

Returns:

  • (String)

See Also:



7
8
9
# File 'lib/google_maps_service.rb', line 7

def key
  @key
end

.queries_per_secondInteger

Global queries_per_second.

Returns:

  • (Integer)

See Also:



27
28
29
# File 'lib/google_maps_service.rb', line 27

def queries_per_second
  @queries_per_second
end

.retry_timeoutInteger

Global retry_timeout.

Returns:

  • (Integer)

See Also:



22
23
24
# File 'lib/google_maps_service.rb', line 22

def retry_timeout
  @retry_timeout
end

Class Method Details

.configure {|config| ... } ⇒ Object

Configure global parameters.

Yields:

  • (config)


31
32
33
34
# File 'lib/google_maps_service.rb', line 31

def configure
  yield self
  true
end