Class: LocalGeocoder::Geometry::Point
- Inherits:
-
Object
- Object
- LocalGeocoder::Geometry::Point
- Defined in:
- lib/local_geocoder/geometry/point.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y, data = nil) ⇒ Point
constructor
A new instance of Point.
- #inspect ⇒ Object
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
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/local_geocoder/geometry/point.rb', line 5 def data @data end |
#x ⇒ Object
Returns the value of attribute x.
5 6 7 |
# File 'lib/local_geocoder/geometry/point.rb', line 5 def x @x end |
#y ⇒ Object
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
#inspect ⇒ Object
12 13 14 |
# File 'lib/local_geocoder/geometry/point.rb', line 12 def inspect "[#{x}, #{y}]" end |