Module: Dap::Filter::Base
- Included in:
- BaseDecoder, FilterAnnotate, FilterCopy, FilterDigest, FilterExclude, FilterExists, FilterExpand, FilterFieldArrayJoinComma, FilterFieldArrayJoinWhitespace, FilterFieldSplit, FilterFieldSplitArray, FilterFlatten, FilterGenericSetMatch, FilterHTMLIframes, FilterHTMLLinks, FilterInclude, FilterInsert, FilterMatchRemove, FilterMatchSelect, FilterNotExists, FilterPrependSubdomains, FilterRecog, FilterRemove, FilterRename, FilterRenameSubkeyMatch, FilterSelect, FilterSplitArray, FilterSplitComma, FilterSplitDomains, FilterSplitLine, FilterSplitNonDynamicDomains, FilterSplitTab, FilterSplitWord, FilterTransform, FilterTruncate, FilterVulnMatchHTTP, FilterVulnMatchIPMI, FilterVulnMatchMSSQL, FilterVulnMatchUPNP
- Defined in:
- lib/dap/filter/base.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/dap/filter/base.rb', line 5 def name @name end |
#opts ⇒ Object
Returns the value of attribute opts.
5 6 7 |
# File 'lib/dap/filter/base.rb', line 5 def opts @opts end |
Instance Method Details
#initialize(args) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/dap/filter/base.rb', line 7 def initialize(args) self.opts = {} args.each do |arg| k,v = arg.split("=", 2) self.opts[k] = v end self.name = Dap::Factory.name_from_class(self.class) end |
#process(doc) ⇒ Object
16 17 18 |
# File 'lib/dap/filter/base.rb', line 16 def process(doc) raise RuntimeError, "No process() method defined for filter #{self.name}" end |