module RuboCop::AST::ParameterizedNode
def arguments?
-
(Boolean)
- whether this node has any arguments
def arguments? !arguments.empty? end
def block_argument?
-
(Boolean)
- whether the last argument of the node is a block pass
def block_argument? arguments? && (last_argument.block_pass_type? || last_argument.blockarg_type?) end
def first_argument
-
(Node, nil)
- the first argument of the node,
def first_argument arguments[0] end
def last_argument
-
(Node, nil)
- the last argument of the node,
def last_argument arguments[-1] end
def parenthesized?
-
(Boolean)
- whether this node's arguments are
def parenthesized? loc.end&.is?(')') end
def splat_argument?
-
(Boolean)
- whether the node is a splat argument
def splat_argument? arguments? && (arguments.any?(&:splat_type?) || arguments.any?(&:restarg_type?)) end