Class: RuboCop::AST::NodePattern::Compiler::Debug
- Inherits:
-
Compiler
- Object
- 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.
Instance Method Summary collapse
-
#initialize ⇒ Debug
constructor
A new instance of Debug.
- #named_parameters ⇒ Object
- #parser ⇒ Object
Constructor Details
#initialize ⇒ Debug
Returns a new instance of Debug.
118 119 120 121 |
# File 'lib/rubocop/ast/node_pattern/compiler/debug.rb', line 118 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.
35 36 37 |
# File 'lib/rubocop/ast/node_pattern/compiler/debug.rb', line 35 def node_ids @node_ids end |
Instance Method Details
#named_parameters ⇒ Object
123 124 125 |
# File 'lib/rubocop/ast/node_pattern/compiler/debug.rb', line 123 def named_parameters super << :trace end |