Sha256: bcc9147f80af3b76bbb13c228fec4159227a7267078ec3e7f3646a208070a8b1

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

module Flagsmith
  module Engine
    module Segments
      module Constants
        # Segment Rules
        ALL_RULE = 'ALL'
        ANY_RULE = 'ANY'
        NONE_RULE = 'NONE'

        RULE_TYPES = [ALL_RULE, ANY_RULE, NONE_RULE].freeze

        # Segment Condition Operators
        EQUAL = 'EQUAL'
        GREATER_THAN = 'GREATER_THAN'
        LESS_THAN = 'LESS_THAN'
        LESS_THAN_INCLUSIVE = 'LESS_THAN_INCLUSIVE'
        CONTAINS = 'CONTAINS'
        GREATER_THAN_INCLUSIVE = 'GREATER_THAN_INCLUSIVE'
        NOT_CONTAINS = 'NOT_CONTAINS'
        NOT_EQUAL = 'NOT_EQUAL'
        REGEX = 'REGEX'
        PERCENTAGE_SPLIT = 'PERCENTAGE_SPLIT'
        IS_SET = 'IS_SET'
        IS_NOT_SET = 'IS_NOT_SET'
        MODULO = 'MODULO'

        CONDITION_OPERATORS = [
          EQUAL,
          GREATER_THAN,
          LESS_THAN,
          LESS_THAN_INCLUSIVE,
          CONTAINS,
          GREATER_THAN_INCLUSIVE,
          NOT_CONTAINS,
          NOT_EQUAL,
          REGEX,
          PERCENTAGE_SPLIT,
          MODULO
        ].freeze
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flagsmith-3.1.1 lib/flagsmith/engine/segments/constants.rb
flagsmith-3.1.0 lib/flagsmith/engine/segments/constants.rb