Created
June 6, 2011 01:17
-
-
Save tario/1009617 to your computer and use it in GitHub Desktop.
packetexample.rb
This file contains 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
require "evalhook" | |
class MyHandler < EvalHook::HookHandler | |
... | |
end | |
handler = MyHandler.new | |
packet = handler.pack(code) | |
# after that, you can run the "packet" as many times as you want without doing all | |
# parsing, tree processing and emulation stuff internally | |
packet.run(binding, name, line) | |
packet.run(binding) | |
packet.run | |
packet.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment