Class: Dap::Filter::FilterExists

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

Direct Known Subclasses

FilterNotExists

Instance Attribute Summary

Attributes included from Base

#name, #opts

Instance Method Summary collapse

Methods included from Base

#initialize

Instance Method Details

#process(doc) ⇒ Object



230
231
232
233
234
235
236
237
# File 'lib/dap/filter/simple.rb', line 230

def process(doc)
  self.opts.each_pair do |k,v|
    if doc.has_key?(k) and doc[k].to_s.length > 0
      return [ doc ]
    end
  end
  [ ]
end