Class: SurrealDB::GeometryCollection

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*geometries) ⇒ GeometryCollection

Returns a new instance of GeometryCollection.



138
139
140
# File 'lib/surrealdb/models/geometry.rb', line 138

def initialize(*geometries)
  @geometries = geometries.freeze
end

Instance Attribute Details

#geometriesObject (readonly)

Returns the value of attribute geometries.



136
137
138
# File 'lib/surrealdb/models/geometry.rb', line 136

def geometries
  @geometries
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



142
143
144
# File 'lib/surrealdb/models/geometry.rb', line 142

def ==(other)
  other.is_a?(GeometryCollection) && other.geometries == @geometries
end

#hashObject



147
148
149
# File 'lib/surrealdb/models/geometry.rb', line 147

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