Class: Dap::Filter::FilterRename
- Inherits:
-
Object
- Object
- Dap::Filter::FilterRename
- 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
9 10 11 12 13 14 15 16 17 |
# File 'lib/dap/filter/simple.rb', line 9 def process(doc) self.opts.each_pair do |k,v| if doc.has_key?(k) doc[v] = doc[k] doc.delete(k) end end [ doc ] end |