Class: Dap::Filter::FilterMatchSelect
- Inherits:
-
Object
- Object
- Dap::Filter::FilterMatchSelect
- Includes:
- Base
- Defined in:
- lib/dap/filter/simple.rb
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#process(doc) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/dap/filter/simple.rb', line 96 def process(doc) ndoc = {} self.opts.each_pair do |re,| doc.each_key do |k| if k.match(re) ndoc[k] = doc[k] end end end (ndoc.keys.length == 0) ? [] : [ ndoc ] end |