module RuboCop::AST::ParameterizedNode

def arguments?

Returns:
  • (Boolean) - whether this method was invoked with arguments
def arguments?
  !arguments.empty?
end

def block_argument?

Returns:
  • (Boolean) - whether the invoked method is a block pass
def block_argument?
  arguments? && last_argument.block_pass_type?
end

def block_literal?

Returns:
  • (Boolean) - whether the invoked method has a block
def block_literal?
  parent && parent.block_type? && eql?(parent.send_node)
end

def block_node

Returns:
  • (BlockNode, nil) - the `block` node associated with this method
def block_node
  parent if block_literal?
end

def first_argument

Returns:
  • (Node, nil) - the first argument of the method invocation,
def first_argument
  arguments[0]
end

def last_argument

Returns:
  • (Node, nil) - the last argument of the method invocation,
def last_argument
  arguments[-1]
end

def parenthesized?

Returns:
  • (Boolean) - whether this super invocation's arguments are
def parenthesized?
  loc.end && loc.end.is?(')')
end

def splat_argument?

Returns:
  • (Boolean) - whether the invoked method is a splat argument
def splat_argument?
  arguments? && arguments.any?(&:splat_type?)
end