Class: GoogleApiCustomization::ApiKey

Inherits:
Object
  • Object
show all
Defined in:
lib/google_api_customization/api_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key = @api_key, sensor = false, options = {}) ⇒ ApiKey

Returns a new instance of ApiKey.



10
11
12
13
14
# File 'lib/google_api_customization/api_key.rb', line 10

def initialize(api_key = @api_key, sensor = false, options = {})
  api_key ? @api_key = api_key : @api_key = GoogleApiCustomization.api_key
  @sensor = sensor
  @options = options
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



5
6
7
# File 'lib/google_api_customization/api_key.rb', line 5

def api_key
  @api_key
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#sensorObject (readonly)

Returns the value of attribute sensor.



8
9
10
# File 'lib/google_api_customization/api_key.rb', line 8

def sensor
  @sensor
end

Instance Method Details

#place_detail(place_id, options = {}) ⇒ Object



16
17
18
# File 'lib/google_api_customization/api_key.rb', line 16

def place_detail(place_id, options = {})
  Place.find(place_id, @api_key, @sensor, @options.merge(options))
end