Class: TurnkeyClient::Operator

Inherits:
Object
  • Object
show all
Defined in:
lib/turnkey_client/models/operator.rb

Constant Summary collapse

EQUAL =
'OPERATOR_EQUAL'.freeze
MORE_THAN =
'OPERATOR_MORE_THAN'.freeze
MORE_THAN_OR_EQUAL =
'OPERATOR_MORE_THAN_OR_EQUAL'.freeze
LESS_THAN =
'OPERATOR_LESS_THAN'.freeze
LESS_THAN_OR_EQUAL =
'OPERATOR_LESS_THAN_OR_EQUAL'.freeze
CONTAINS =
'OPERATOR_CONTAINS'.freeze
NOT_EQUAL =
'OPERATOR_NOT_EQUAL'.freeze
IN =
'OPERATOR_IN'.freeze
NOT_IN =
'OPERATOR_NOT_IN'.freeze
CONTAINS_ONE =
'OPERATOR_CONTAINS_ONE'.freeze
CONTAINS_ALL =
'OPERATOR_CONTAINS_ALL'.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • enum value in the form of the string

Returns:

  • The enum value



31
32
33
34
35
# File 'lib/turnkey_client/models/operator.rb', line 31

def build_from_hash(value)
  constantValues = Operator.constants.select { |c| Operator::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #Operator" if constantValues.empty?
  value
end