class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler
def remaining_arities(children, last_arity)
-
(Array
- total arities (as Ranges) of remaining children nodes)
def remaining_arities(children, last_arity) last = last_arity arities = children .reverse .map(&:arity_range) .map { |r| last = last.begin + r.begin..last.max + r.max } .reverse! arities.push last_arity end