Class: Dap::Filter::FilterMatchSelect
- Inherits:
-
Object
- Object
- Dap::Filter::FilterMatchSelect
- Includes:
- Base
- Defined in:
- lib/dap/filter/simple.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#process(doc) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/dap/filter/simple.rb', line 132 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 |