Class: SurrealDB::GeometryMultiPolygon
- Inherits:
-
Object
- Object
- SurrealDB::GeometryMultiPolygon
- Defined in:
- lib/surrealdb/models/geometry.rb
Instance Attribute Summary collapse
-
#polygons ⇒ Object
readonly
Returns the value of attribute polygons.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(*polygons) ⇒ GeometryMultiPolygon
constructor
A new instance of GeometryMultiPolygon.
Constructor Details
#initialize(*polygons) ⇒ GeometryMultiPolygon
Returns a new instance of GeometryMultiPolygon.
121 122 123 |
# File 'lib/surrealdb/models/geometry.rb', line 121 def initialize(*polygons) @polygons = polygons.freeze end |
Instance Attribute Details
#polygons ⇒ Object (readonly)
Returns the value of attribute polygons.
119 120 121 |
# File 'lib/surrealdb/models/geometry.rb', line 119 def polygons @polygons end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
125 126 127 |
# File 'lib/surrealdb/models/geometry.rb', line 125 def ==(other) other.is_a?(GeometryMultiPolygon) && other.polygons == @polygons end |
#hash ⇒ Object
130 131 132 |
# File 'lib/surrealdb/models/geometry.rb', line 130 def hash [self.class, @polygons].hash end |