Module: Skeptic::SexpVisitor::ClassMethods

Defined in:
lib/skeptic/sexp_visitor.rb

Instance Method Summary collapse

Instance Method Details

#handlersObject



9
10
11
# File 'lib/skeptic/sexp_visitor.rb', line 9

def handlers
  @handlers ||= {}
end

#on(*types, &block) ⇒ Object



13
14
15
16
17
# File 'lib/skeptic/sexp_visitor.rb', line 13

def on(*types, &block)
  types.each do |type|
    handlers[type] = block
  end
end