Class: GoogleGeocode::Location

Inherits:
Struct
  • Object
show all
Defined in:
lib/google_geocode.rb,
lib/google_geocode.rb

Overview

A Location contains the following fields:

latitude

Latitude of the location

longitude

Longitude of the location

address

Street address of the result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#addressObject

Returns the value of attribute address

Returns:

  • (Object)

    the current value of address



34
35
36
# File 'lib/google_geocode.rb', line 34

def address
  @address
end

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



34
35
36
# File 'lib/google_geocode.rb', line 34

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



34
35
36
# File 'lib/google_geocode.rb', line 34

def longitude
  @longitude
end

Instance Method Details

#coordinatesObject

The coordinates for this location.



117
118
119
# File 'lib/google_geocode.rb', line 117

def coordinates
  [latitude, longitude]
end