Method: RuboCop::AST::MethodDispatchNode#block_literal?

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

#block_literal?Boolean

Whether this method dispatch has an explicit block.

Returns:

  • (Boolean)

    whether the dispatched method has a block



131
132
133
# File 'lib/rubocop/ast/node/mixin/method_dispatch_node.rb', line 131

def block_literal?
  parent && parent.block_type? && eql?(parent.send_node)
end