Aquarium icon indicating copy to clipboard operation
Aquarium copied to clipboard

[RubyForge-13405] Support "MyClass#my_method" and "MyClass.my_method" as convenience options

Open hedgehog opened this issue 15 years ago • 1 comments

Date:2007-08-26 20:18 Priority:1 Submitted By:Dean Wampler (deanwampler) Assigned To:Dean Wampler (deanwampler) Category:Pointcut language State:Open Summary:Support "MyClass#my_method" and "MyClass.my_method" as convenience options

Detailed description

I.e., after "MyClass#my_method" ...

as a convenient alternative for instance methods instead of after :type => MyClass, :method => :my_method

Simiarly, after "MyClass.my_method" ...

as a convenient alternative for class methods instead of after :type => MyClass, :method => :my_method, :method_options => [:class]

However, the distinction between '#' and '.' is probably too subtle and both should either be interpreted as instance methods (the most common case) or should be allowed to match either instance or class methods, whatever matches.

hedgehog avatar Jan 29 '10 00:01 hedgehog

I think the Class#method convention for referring to instance methods is sufficiently sell established in Rubyists minds that what you propose would be acceptable to most people. That is, I'd disagree with the 'However...'

hedgehog avatar Jan 29 '10 00:01 hedgehog