[ruby/prism] [Doc] Tweak example of Prism::Dispatcher
This PR tweaked the documentation to correct an error encountered when running the example code of `Prism::Dispatcher`. This aims to make understanding the example smoother. https://github.com/ruby/prism/commit/165a1a0e78
This commit is contained in:
parent
7de2c06352
commit
0fe816f380
@ -14,7 +14,8 @@ module Prism
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# dispatcher = Dispatcher.new
|
||||
# listener = OctalListener.new
|
||||
# dispatcher = Prism::Dispatcher.new
|
||||
# dispatcher.register(listener, :on_integer_node_enter)
|
||||
#
|
||||
# Then, you can walk any number of trees and dispatch events to the listeners:
|
||||
|
Loading…
x
Reference in New Issue
Block a user