Module: Dap::Filter::BaseDecoder

Instance Attribute Summary

Attributes included from Base

#name, #opts

Instance Method Summary collapse

Methods included from Base

#initialize

Instance Method Details

#process(doc) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/dap/filter/base.rb', line 24

def process(doc)
  self.opts.each_pair do |k,v|
    next unless doc.has_key?(k)
    info = decode(doc[k]) || {}
    info.each_pair do |x,y|
      doc[ "#{k}.#{x}" ] = y
    end
  end
 [ doc ]
end