Question

Ruby has method_missing , Python has getattr. Does Boo offer something I can use to intercept method calls?

Was it helpful?

Solution

Yes, Boo has IQuackFu.

Basically, you implement IQuackFu, which has three methods:

  • QuackGet: gets called when you get a property value
  • QuackSet gets called when you set a property value
  • QuackInvoke: gets called when you invoke a method

Here's an example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top