Class: Dap::Filter::FilterFieldArrayJoinComma

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/dap/filter/simple.rb

Instance Attribute Summary

Attributes included from Base

#name, #opts

Instance Method Summary collapse

Methods included from Base

#initialize

Instance Method Details

#process(doc) ⇒ Object



344
345
346
347
348
349
350
351
# File 'lib/dap/filter/simple.rb', line 344

def process(doc)
  self.opts.each_pair do |k,v|
    if doc.has_key?(v) and doc[v].respond_to?(:each)
      doc[k] = doc[v].join(",")
    end
  end
 [ doc ]
end