Method: RuboCop::AST::MethodDispatchNode#macro?

Defined in:
lib/rubocop/ast/node/mixin/method_dispatch_node.rb

#macro?Boolean

Note:

This does not include DSLs that use nested blocks, like RSpec

Checks whether the dispatched method is a macro method. A macro method is defined as a method that sits in a class, module, or block body and has an implicit receiver.

Returns:

  • (Boolean)

    whether the dispatched method is a macro method



39
40
41
# File 'lib/rubocop/ast/node/mixin/method_dispatch_node.rb', line 39

def macro?
  !receiver && macro_scope?
end