Sha256: 96b7118ad5744f971f50e0bf1b9556ccd20452944ff1c6fcf675355e2c5dbea6

Contents?: true

Size: 337 Bytes

Versions: 8

Compression:

Stored size: 337 Bytes

Contents

# frozen_string_literal: true

require_relative "binary_operator"

class MatchOperator
  include BinaryOperator

  def binary(evaluator, lhs, rhs)
    text = evaluator.string_convert(lhs)
    unless text.nil?
      pattern = evaluator.string_convert(rhs)
      unless pattern.nil?
        text.match(pattern)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
absmartly-sdk-1.1.2 lib/json_expr/operators/match_operator.rb
absmartly-sdk-1.1.1 lib/json_expr/operators/match_operator.rb
absmartly-sdk-1.1.0 lib/json_expr/operators/match_operator.rb
absmartly-sdk-1.0.8 lib/json_expr/operators/match_operator.rb
absmartly-sdk-1.0.7 lib/json_expr/operators/match_operator.rb
absmartly-sdk-1.0.6 lib/json_expr/operators/match_operator.rb
absmartly-sdk-1.0.5 lib/json_expr/operators/match_operator.rb
absmartly-sdk-0.1.2 lib/json_expr/operators/match_operator.rb