Class: Dap::Filter::FilterTruncate
- Inherits:
-
Object
- Object
- Dap::Filter::FilterTruncate
- 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
359 360 361 362 363 364 365 366 |
# File 'lib/dap/filter/simple.rb', line 359 def process(doc) self.opts.each_pair do |k,v| if doc.has_key?(k) doc[k] = doc[k].to_s[0, v.to_i] end end [ doc ] end |