class RuboCop::AST::NodePattern::Node::AnyOrder

Node class for `<int str …>`

Constants

ARITIES

Public Instance Methods

arity() click to toggle source
# File lib/rubocop/ast/node_pattern/node.rb, line 194
def arity
  return children.size unless ends_with_rest?

  ARITIES[children.size]
end
ends_with_rest?() click to toggle source
# File lib/rubocop/ast/node_pattern/node.rb, line 186
def ends_with_rest?
  children.last.rest?
end
rest_node() click to toggle source
# File lib/rubocop/ast/node_pattern/node.rb, line 190
def rest_node
  children.last if ends_with_rest?
end
term_nodes() click to toggle source
# File lib/rubocop/ast/node_pattern/node.rb, line 182
def term_nodes
  ends_with_rest? ? children[0...-1] : children
end