Created
September 21, 2012 16:20
-
-
Save chriswailes/3762434 to your computer and use it in GitHub Desktop.
Visitor Implementation Options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyVisitor < RLTK::Visitor | |
def wrapper_fun | |
... | |
yield | |
... | |
end | |
# Option 1 | |
on KlassName do | |
wrapper_fun do |params| | |
# do stuff | |
end | |
end | |
# Option 2 | |
on KlassName, wrapper: :wrapper_fun do | |
# do stuff | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment