Class: Enums::ShapeRelations

Inherits:
Object
  • Object
show all
Defined in:
lib/enums/shape_relations.rb

Overview

Enum class representing the relationship between a Query / Filter Shape and indexed Shapes that will be used to determine if a Document should be matched or not

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.containsShapeRelations

Returns ShapeRelations object corresponding to elasticsearch option of ‘contains’.

Returns:

  • (ShapeRelations)

    ShapeRelations object corresponding to elasticsearch option of ‘contains’



30
31
32
# File 'lib/enums/shape_relations.rb', line 30

def self.contains
  new(CONTAINS)
end

.intersectsShapeRelations

Returns ShapeRelations object corresponding to elasticsearch option of ‘intersects’.

Returns:

  • (ShapeRelations)

    ShapeRelations object corresponding to elasticsearch option of ‘intersects’



38
39
40
# File 'lib/enums/shape_relations.rb', line 38

def self.intersects
  new(INTERSECTS)
end

.withinShapeRelations

Returns ShapeRelations object corresponding to elasticsearch option of ‘within’.

Returns:

  • (ShapeRelations)

    ShapeRelations object corresponding to elasticsearch option of ‘within’



22
23
24
# File 'lib/enums/shape_relations.rb', line 22

def self.within
  new(WITHIN)
end

Instance Method Details

#numberShapeRelations

Returns ShapeRelations object corresponding to elasticsearch option of ‘intersects’.

Returns:

  • (ShapeRelations)

    ShapeRelations object corresponding to elasticsearch option of ‘intersects’



22
23
24
# File 'lib/enums/shape_relations.rb', line 22

def self.within
  new(WITHIN)
end