Aspect4r 0.7.1 is released
I’ve just released Aspect4r 0.7.1. Please see more details on my blog post. Aspect4r adds a solid method wrapper to Ruby, makes it easy to do Aspect Oriented Programming with help of Ruby’s powerful meta-programming functionality.
Comments
Kudos. Looks good. I’ll have to dig into the code when I get a chance. The only thing I might suggest at first glance is using ‘proxy.call(value)’ and/or ‘proxy[value]’ instead of ‘a4r_invoke proxy, value’ if possible. The proxy might even respond to #to_proc.
The proxy is generated by aspect4r. It is currently a method object and can be directly invoked like proxy.bind(self).call(*args). However, this can potentially change, that is why I provide a method to invoke it. When I change internals, I can update a4r_invoke too. IMO “a4r_invoke proxy, *args” also looks better too.
In generated code, I could do proxy.bind(self) then pass it to the advice block. Then in advice, proxy.call(*args) will work.
Post a comment