Module: Octo::Segmentation::Operators

Defined in:
lib/octocore-cassandra/segment.rb

Overview

The Operators modules. Defines Operators and necessary methods around

Constant Summary collapse

EQUAL =
0
NOT_EQUAL =
1
GTE =
2
GT =
3
LTE =
4
LT =
5
IN =
6
AND =
7
OR =
8
NOT =
9
XOR =
10

Class Method Summary collapse

Class Method Details

.valid?(operator) ⇒ Boolean

Returns if the given operator is valid or not

Returns:

  • (Boolean)


206
207
208
# File 'lib/octocore-cassandra/segment.rb', line 206

def valid?(operator)
  Set.new([EQUAL, NOT_EQUAL, GTE, GT, LTE, LT, IN]).include?(operator.to_i)
end