bragi (owner)

Revisions

gist: 85382 Download_button fork
public
Public Clone URL: git://gist.github.com/85382.git
Embed All Files: show embed
call_inspector.ik #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
    )
  )
)