Class: SurrealDB::GeometryMultiPolygon

Inherits:
Object
  • Object
show all
Defined in:
lib/surrealdb/models/geometry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#polygonsObject (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

#hashObject



130
131
132
# File 'lib/surrealdb/models/geometry.rb', line 130

def hash
  [self.class, @polygons].hash
end