Skip to content

Instantly share code, notes, and snippets.

@tario
Created June 6, 2011 01:17
Show Gist options
  • Save tario/1009617 to your computer and use it in GitHub Desktop.
Save tario/1009617 to your computer and use it in GitHub Desktop.
packetexample.rb
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