Class: GoogleGeocodeApi::Address
- Inherits:
-
Object
- Object
- GoogleGeocodeApi::Address
- Defined in:
- lib/google_geocode_api/address.rb
Overview
Address object
Instance Attribute Summary collapse
-
#formatted_address ⇒ Object
readonly
Returns the value of attribute formatted_address.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#location_type ⇒ Object
readonly
Returns the value of attribute location_type.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#place_id ⇒ Object
readonly
Returns the value of attribute place_id.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(obj) ⇒ Address
Returns a new instance of Address.
8 9 10 11 12 13 14 |
# File 'lib/google_geocode_api/address.rb', line 8 def initialize(obj) @formatted_address = obj.formatted_address @place_id = obj.place_id @latitude = obj.geometry.location.lat @longitude = obj.geometry.location.lng @location_type = obj.geometry.location_type end |
Instance Attribute Details
#formatted_address ⇒ Object (readonly)
Returns the value of attribute formatted_address.
6 7 8 |
# File 'lib/google_geocode_api/address.rb', line 6 def formatted_address @formatted_address end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
6 7 8 |
# File 'lib/google_geocode_api/address.rb', line 6 def latitude @latitude end |
#location_type ⇒ Object (readonly)
Returns the value of attribute location_type.
6 7 8 |
# File 'lib/google_geocode_api/address.rb', line 6 def location_type @location_type end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
6 7 8 |
# File 'lib/google_geocode_api/address.rb', line 6 def longitude @longitude end |
#place_id ⇒ Object (readonly)
Returns the value of attribute place_id.
6 7 8 |
# File 'lib/google_geocode_api/address.rb', line 6 def place_id @place_id end |