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
107 108 109 |
# File 'lib/unparser/ast/local_variable_scope.rb', line 107 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
119 120 121 122 |
# File 'lib/unparser/ast/local_variable_scope.rb', line 119 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
134 135 136 |
# File 'lib/unparser/ast/local_variable_scope.rb', line 134 def each(node, &block) visit(node, &block) end |