Class: Dap::Filter::FilterFieldSplitLine
- Inherits:
-
Object
- Object
- Dap::Filter::FilterFieldSplitLine
- 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
264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/dap/filter/simple.rb', line 264 def process(doc) self.opts.each_pair do |k,v| if doc.has_key?(k) lcount = 1 doc[k].to_s.split(/\n/).each do |line| doc.merge!({ "#{k}.f#{lcount}" => line }) lcount += 1 end end end [ doc ] end |