Class: MemDB::Field::Pattern::SingleMatching
- Inherits:
-
Object
- Object
- MemDB::Field::Pattern::SingleMatching
- Includes:
- Matching
- Defined in:
- lib/mem_db/field/pattern.rb
Instance Method Summary collapse
-
#initialize(el, rx_engine:) ⇒ SingleMatching
constructor
A new instance of SingleMatching.
- #match?(values) ⇒ Boolean
Constructor Details
#initialize(el, rx_engine:) ⇒ SingleMatching
Returns a new instance of SingleMatching.
94 95 96 |
# File 'lib/mem_db/field/pattern.rb', line 94 def initialize(el, rx_engine:) @pat = Pattern.new(el, rx_engine: rx_engine) end |
Instance Method Details
#match?(values) ⇒ Boolean
98 99 100 |
# File 'lib/mem_db/field/pattern.rb', line 98 def match?(values) values.any? { |str| @pat.match?(str) } end |