Class: GeocoderUs::Location

Inherits:
Struct
  • Object
show all
Defined in:
lib/geocoder_us.rb,
lib/geocoder_us.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



12
13
14
# File 'lib/geocoder_us.rb', line 12

def address
  @address
end

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



12
13
14
# File 'lib/geocoder_us.rb', line 12

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



12
13
14
# File 'lib/geocoder_us.rb', line 12

def longitude
  @longitude
end

Instance Method Details

#coordinatesObject

The coordinates for this location.



83
84
85
# File 'lib/geocoder_us.rb', line 83

def coordinates
  return [latitude, longitude]
end