Class: Prism::BasicVisitor

Inherits:
Object
  • Object
show all
Defined in:
lib/sirop/prism_ext.rb

Direct Known Subclasses

Sirop::Finder, Sirop::Sourcifier

Instance Method Summary collapse

Instance Method Details

#on(type) ⇒ Object



6
7
8
9
# File 'lib/sirop/prism_ext.rb', line 6

def on(type, &)
  singleton_class.define_method(:"visit_#{type}_node", &)
  self
end