Class: RuboCop::AST::NodePattern::Compiler::Debug
- Inherits:
-
RuboCop::AST::NodePattern::Compiler
- Object
- RuboCop::AST::NodePattern::Compiler
- RuboCop::AST::NodePattern::Compiler::Debug
- Defined in:
- lib/rubocop/ast/node_pattern/compiler/debug.rb
Overview
Variant of the Compiler with tracing information for nodes
Defined Under Namespace
Modules: InstrumentationSubcompiler Classes: Colorizer, NodePatternSubcompiler, SequenceSubcompiler, Trace
Instance Attribute Summary collapse
-
#node_ids ⇒ Object
readonly
Returns the value of attribute node_ids.
Attributes inherited from RuboCop::AST::NodePattern::Compiler
#binding, #captures, #positional_parameters
Instance Method Summary collapse
-
#initialize ⇒ Debug
constructor
A new instance of Debug.
- #named_parameters ⇒ Object
- #parser ⇒ Object
Methods inherited from RuboCop::AST::NodePattern::Compiler
#compile_as_atom, #compile_as_node_pattern, #compile_sequence, #each_union, #freeze, #named_parameter, #next_capture, #positional_parameter, #with_temp_variables
Methods included from SimpleForwardable
Constructor Details
#initialize ⇒ Debug
Returns a new instance of Debug.
123 124 125 126 |
# File 'lib/rubocop/ast/node_pattern/compiler/debug.rb', line 123 def initialize super @node_ids = Hash.new { |h, k| h[k] = h.size }.compare_by_identity end |
Instance Attribute Details
#node_ids ⇒ Object (readonly)
Returns the value of attribute node_ids.
33 34 35 |
# File 'lib/rubocop/ast/node_pattern/compiler/debug.rb', line 33 def node_ids @node_ids end |
Instance Method Details
#named_parameters ⇒ Object
128 129 130 |
# File 'lib/rubocop/ast/node_pattern/compiler/debug.rb', line 128 def named_parameters super << :trace end |