Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kitty := Object clone
- kitty funWithIntrospection := method(
- "Message name: " print; call message name println;
- "Message sender: " print; call sender println;
- "Message target: " print; call target println;
- "Message arguments: " print; call message arguments foreach(println);
- )
- kitty funWithIntrospection(hooray, stuff, 3*9, Foo(bar(baz)))
- # Output looks like:
- #Message name: funWithIntrospection
- #Message sender: Object_0x180ec20:
- # Lobby = Object_0x180ec20
- # Protos = Object_0x180e9c0
- # _ = nil
- # exit = method(...)
- # forward = method(...)
- # kitty = Object_0x1b63780
- # set_ = method(...)
- #
- #Message target: Object_0x1b63780:
- # funWithIntrospection = method(...)
- #
- #Message arguments: hooray
- #stuff
- #3 *(9)
- #Foo(bar(baz))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement