Class: Geocoder::Result::GooglePlacesDetails

Inherits:
Google
  • Object
show all
Defined in:
lib/geocoder/results/google_places_details.rb

Instance Attribute Summary

Attributes inherited from Base

#cache_hit, #data

Instance Method Summary collapse

Methods inherited from Google

#address, #address_components, #address_components_of_type, #city, #coordinates, #country, #country_code, #formatted_address, #geometry, #neighborhood, #postal_code, #precision, #route, #state, #state_code, #street_address, #street_number, #sub_state, #sub_state_code

Methods inherited from Base

#address, #coordinates, #country, #country_code, #initialize, #latitude, #longitude, #province, #province_code, #state, #state_code

Constructor Details

This class inherits a constructor from Geocoder::Result::Base

Instance Method Details

#phone_numberObject


26
27
28
# File 'lib/geocoder/results/google_places_details.rb', line 26

def phone_number
  @data["international_phone_number"]
end

#place_idObject


6
7
8
# File 'lib/geocoder/results/google_places_details.rb', line 6

def place_id
  @data["place_id"]
end

#ratingObject


18
19
20
# File 'lib/geocoder/results/google_places_details.rb', line 18

def rating
  @data["rating"]
end

#rating_countObject


22
23
24
# File 'lib/geocoder/results/google_places_details.rb', line 22

def rating_count
  @data["user_ratings_total"]
end

#reviewsObject


14
15
16
# File 'lib/geocoder/results/google_places_details.rb', line 14

def reviews
  @data["reviews"] || []
end

#typesObject


10
11
12
# File 'lib/geocoder/results/google_places_details.rb', line 10

def types
  @data["types"] || []
end

#websiteObject


30
31
32
# File 'lib/geocoder/results/google_places_details.rb', line 30

def website
  @data["website"]
end