Class: GeoRb::Location
- Inherits:
-
Object
- Object
- GeoRb::Location
- Extended by:
- Forwardable
- Defined in:
- lib/geo_rb/location.rb
Overview
Contains a parsed geocoder response. Can be iterated over as “(location<String>, (latitude<float>, longitude<Float))“.
Or one can access the properties ``address``, ``latitude``,
``longitude``, or ``raw``. The last
is a dictionary of the geocoder's response for this item.
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#point ⇒ Object
readonly
Returns the value of attribute point.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Class Method Summary collapse
Instance Method Summary collapse
- #distance_to(location) ⇒ Object
-
#initialize(address:, raw:, point: Point) ⇒ Location
constructor
A new instance of Location.
- #to_h ⇒ Object
Constructor Details
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
12 13 14 |
# File 'lib/geo_rb/location.rb', line 12 def address @address end |
#point ⇒ Object (readonly)
Returns the value of attribute point.
12 13 14 |
# File 'lib/geo_rb/location.rb', line 12 def point @point end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
12 13 14 |
# File 'lib/geo_rb/location.rb', line 12 def raw @raw end |