Class: EsriShapefile::Shapes::Point
- Inherits:
-
Object
- Object
- EsriShapefile::Shapes::Point
- Includes:
- ByteModel
- Defined in:
- lib/esri_shapefile/models/shapes/point.rb
Overview
A point consists of a pair of double-precision coordinates in the order X,Y.
Instance Attribute Summary
Attributes included from ByteModel
Class Method Summary collapse
Instance Method Summary collapse
- #eql?(point) ⇒ Boolean (also: #==)
Methods included from ByteModel
Class Method Details
.at(x:, y:) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/esri_shapefile/models/shapes/point.rb', line 16 def self.at(x:, y:) point = Point.new point.x = x point.y = y point end |
Instance Method Details
#eql?(point) ⇒ Boolean Also known as: ==
23 24 25 |
# File 'lib/esri_shapefile/models/shapes/point.rb', line 23 def eql?(point) point.is_a?(Point) && point.x == x && point.y == y end |