module RuboCop::AST::ParameterizedNode::RestArguments
def arguments
-
(Array
- arguments, if any)
def arguments if arguments? children.drop(first_argument_index).freeze else # Skip unneeded Array allocation. EMPTY_ARGUMENTS end end
def arguments?
-
(Boolean)
- whether this node has any arguments
def arguments? children.size > first_argument_index end
def first_argument
-
(Node, nil)
- the first argument of the node,
def first_argument children[first_argument_index] end
def last_argument
-
(Node, nil)
- the last argument of the node,
def last_argument children[-1] if arguments? end