Guoliang Cao
Guoliang Cao
One way to improve performance is to use array to store advices that use regular expression. Advices specific to methods are stored in hash. (Do this only when performance is...
This adds a lot complexity and might not be a good idea. Inheritance can be achieved by putting advices in ModuleX.included or ClassY.inherited
This brings up some interesting things: When a new_methods_only advice for /*/ is defined, it'll not be applied to an existing method. When another advice is defined for :test, the...
What use can this bring? skip advice for specific methods. debugging purpose. testing purpose.
Yeah. I was doing some experiment in this repo a couple months back. > On Nov 18, 2015, at 12:19 PM, Maciej Mensfeld [email protected] wrote: > > Ping ;) >...
Debug usage and output example: Aspect4r.debug 'Klass', :test # ??? before :test do end around :test do end a4r test +- enter advice 2 (around): a4r test | +- enter...
Might not be a problem because we alias xxx to xxx_without_a4r on before_method/... What if xxx defined in parent class/module calls super too? In this case, DO NOT USE ASPECT4R!
See super_in_method_spec.rb
Test super in advices (they should work too ?!)
2 feels better. Group aspects by hash of class/module that defines those aspects. Before aspects in modules are inserted before and after aspects are appended after. Around aspects ???