-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: allow method calls on constants #144
Comments
Just for the reference, the idea was to allow usage of Just to make sure, is it correct that given: module A
module B
def self.a_method
# ...
end
end
end
module RuboCop
module Cop
class SomeCop < Base
include A
def_node_matcher :a, '( #B.a_method ...)'
end
end
end would be able to call It would be a nice way to structure configurable DSL helpers. |
I don't think it would be difficult tbh. I just wonder what is the best to have, the most useful in general. Maybe even both forms...
Yes. So the question is: should I implement both, or only one (and which one) 😅 |
If the namespace is relative, i.e. you don't have to specify |
Released as v1.1.0 |
@marcandre You're like a ⚡-man! 💯 |
Currently methods & predicates can be called on
self
:Request is to allow calling them on constants:
The text was updated successfully, but these errors were encountered: