class MemDB::Field::Regexp::SingleMatching
Public Class Methods
new(field, el)
click to toggle source
# File lib/mem_db/field/regexp.rb, line 41 def initialize(field, el) @field = field @pat = Rx.new(el) end
Public Instance Methods
match?(query)
click to toggle source
# File lib/mem_db/field/regexp.rb, line 46 def match?(query) @field.query_value(query).any? { |str| @pat.match?(str) } end