Class: RuboCop::AST::NodePattern::Node::Repetition
- Inherits:
-
RuboCop::AST::NodePattern::Node
- Object
- Parser::AST::Node
- RuboCop::AST::NodePattern::Node
- RuboCop::AST::NodePattern::Node::Repetition
- Includes:
- ForbidInSeqHead
- Defined in:
- lib/rubocop/ast/node_pattern/node.rb
Overview
Node class for ‘int+`
Constant Summary collapse
- ARITIES =
{ '*': 0..Float::INFINITY, '+': 1..Float::INFINITY, '?': 0..1 }.freeze
Constants inherited from RuboCop::AST::NodePattern::Node
Instance Method Summary collapse
Methods included from ForbidInSeqHead
Methods inherited from RuboCop::AST::NodePattern::Node
#arity_range, #capture?, #child, #children_nodes, #in_sequence_head, #matches_within_set?, #nb_captures, #rest?, #variadic?, #with
Methods included from Descendence
#child_nodes, #descendants, #each_child_node, #each_descendant, #each_node
Instance Method Details
#arity ⇒ Object
152 153 154 |
# File 'lib/rubocop/ast/node_pattern/node.rb', line 152 def arity ARITIES[operator] end |
#operator ⇒ Object
142 143 144 |
# File 'lib/rubocop/ast/node_pattern/node.rb', line 142 def operator children[1] end |