module RuboCop::AST::ParameterizedNode
def arguments?
-
(Boolean)
- whether this method was invoked with arguments
def arguments? !arguments.empty? end
def block_argument?
-
(Boolean)
- whether the invoked method is a block pass
def block_argument? arguments? && last_argument.block_pass_type? end
def block_literal?
-
(Boolean)
- whether the invoked method has a block
def block_literal? parent && parent.block_type? && eql?(parent.send_node) end
def block_node
-
(BlockNode, nil)
- the `block` node associated with this method
def block_node parent if block_literal? end
def first_argument
-
(Node, nil)
- the first argument of the method invocation,
def first_argument arguments[0] end
def last_argument
-
(Node, nil)
- the last argument of the method invocation,
def last_argument arguments[-1] end
def parenthesized?
-
(Boolean)
- whether this super invocation's arguments are
def parenthesized? loc.end && loc.end.is?(')') end
def splat_argument?
-
(Boolean)
- whether the invoked method is a splat argument
def splat_argument? arguments? && arguments.any?(&:splat_type?) end