class Nominatim::Point
Attributes
lat[R]
latitude[R]
lon[R]
longitude[R]
Public Class Methods
new(lat, lon)
click to toggle source
@param lat [Float] @param lon [Float]
# File lib/nominatim/point.rb, line 9 def initialize(lat, lon) @lat, @lon = lat.to_f, lon.to_f if lat && lon end
Public Instance Methods
==(other)
click to toggle source
@return [true, false]
# File lib/nominatim/point.rb, line 26 def ==(other) self.to_a == other.to_a end
to_a()
click to toggle source
@return [Array]
# File lib/nominatim/point.rb, line 14 def to_a [lat, lon] end
to_s()
click to toggle source
Return a string representation of the point
@return [String]
# File lib/nominatim/point.rb, line 21 def to_s to_a.to_s end