Module: Laser::Analysis::Visitor::ClassMethods

Extended by:
ModuleExtensions
Defined in:
lib/laser/analysis/visitor.rb

Defined Under Namespace

Classes: Filter

Instance Method Summary (collapse)

Methods included from ModuleExtensions

attr_accessor_with_default, cattr_accessor, cattr_accessor_with_default, cattr_get_and_setter, cattr_reader, cattr_writer, opposite_method

Instance Method Details

- (Object) add(*args, &blk)

Adds a new filter with the given matching strategies and a block to run upon matching a node.



64
65
66
# File 'lib/laser/analysis/visitor.rb', line 64

def add(*args, &blk)
  (self.filters ||= []) << Filter.new(args, blk)
end