Module: Dap::Filter::Base

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/dap/filter/base.rb', line 5

def name
  @name
end

#optsObject

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

Raises:

  • (RuntimeError)


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