class TransactionQL::Match

Public Class Methods

new(column, regexp) click to toggle source
# File lib/transaction_ql/expressions.rb, line 65
def initialize(column, regexp)
  @column = column
  @regexp = regexp
end

Public Instance Methods

matches?(hash) click to toggle source
# File lib/transaction_ql/expressions.rb, line 70
def matches?(hash)
  match = @regexp.match hash.fetch(@column)
  return !match.nil?
end