Module: GoogleMaps

Defined in:
lib/google_maps.rb,
lib/google_maps/geocoder.rb,
lib/google_maps/geocoder/result.rb,
lib/google_maps/geocoder/location.rb

Defined Under Namespace

Modules: Geocoder Classes: GeocodeFailed

Constant Summary collapse

@@enterprise_account =
false
@@key =
nil

Class Method Summary collapse

Class Method Details

.client(*args) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/google_maps.rb', line 14

def self.client(*args)
  if args.present?
    @@client = args.first
  else
    @@client
  end
end

.configure(&block) ⇒ Object



10
11
12
# File 'lib/google_maps.rb', line 10

def self.configure(&block)
  block.call(self)
end

.enterprise_account?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/google_maps.rb', line 38

def self.enterprise_account?
  @@enterprise_account || false
end

.key(*args) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/google_maps.rb', line 22

def self.key(*args)
  if args.present?
    @@key = args.first
  else
    @@key
  end
end

.use_enterprise_account(*args) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/google_maps.rb', line 30

def self.(*args)
  if args.first.present? && args.first == false
    @@enterprise_account = false
  else
    @@enterprise_account = true
  end
end