Skip to content

Instantly share code, notes, and snippets.

@bragi
Created March 25, 2009 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bragi/85382 to your computer and use it in GitHub Desktop.
Save bragi/85382 to your computer and use it in GitHub Desktop.
CallInspector = Origin mimic do(
nesting = 0
entering = lecrox(
"#{"| " * nesting}+called #{call receiver}:#{call message name}(#{call arguments})" println
nesting ++
)
leaving = lecrox(
nesting --
"#{"| " * nesting}\\returned #{aspectResult asText truncate}" println
)
instrument = method(+objects,
objects each(object,
object before(matching: :anyFromSelf) << entering
object after(matching: :anyFromSelf) << leaving
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment