Class: LocalGeocoder::Geometry::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/local_geocoder/geometry/point.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y, data = nil) ⇒ Point

Returns a new instance of Point.



6
7
8
9
10
# File 'lib/local_geocoder/geometry/point.rb', line 6

def initialize(x, y, data=nil)
  @x = x
  @y = y
  @data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



5
6
7
# File 'lib/local_geocoder/geometry/point.rb', line 5

def data
  @data
end

#xObject

Returns the value of attribute x.



5
6
7
# File 'lib/local_geocoder/geometry/point.rb', line 5

def x
  @x
end

#yObject

Returns the value of attribute y.



5
6
7
# File 'lib/local_geocoder/geometry/point.rb', line 5

def y
  @y
end

Instance Method Details

#inspectObject



12
13
14
# File 'lib/local_geocoder/geometry/point.rb', line 12

def inspect
  "[#{x}, #{y}]"
end