Class: Unparser::AST::LocalVariableScopeEnumerator
- Inherits:
-
Object
- Object
- Unparser::AST::LocalVariableScopeEnumerator
- Includes:
- Enumerable
- Defined in:
- lib/unparser/ast/local_variable_scope.rb
Overview
Local variable scope enumerator
Class Method Summary collapse
-
.each(node, &block) ⇒ self
private
Enumerate each node with its local variable scope.
Instance Method Summary collapse
-
#each(node, &block) ⇒ self, Enumerator<Array<Symbol>>
private
Enumerate local variable scope scope.
-
#initialize ⇒ undefined
constructor
private
Initialize object.
Constructor Details
#initialize ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize object
93 94 95 |
# File 'lib/unparser/ast/local_variable_scope.rb', line 93 def initialize @stack = [Set.new] end |
Class Method Details
.each(node, &block) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Enumerate each node with its local variable scope
105 106 107 108 |
# File 'lib/unparser/ast/local_variable_scope.rb', line 105 def self.each(node, &block) new.each(node, &block) self end |
Instance Method Details
#each(node, &block) ⇒ self, Enumerator<Array<Symbol>>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Enumerate local variable scope scope
120 121 122 |
# File 'lib/unparser/ast/local_variable_scope.rb', line 120 def each(node, &block) visit(node, &block) end |