Module: Unparser::Emitter::LocalVariableRoot

Included in:
Class, Def, Module, Root
Defined in:
lib/unparser/emitter.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(descendant) ⇒ Object



31
32
33
34
35
# File 'lib/unparser/emitter.rb', line 31

def self.included(descendant)
  descendant.class_eval do
    memoize :local_variable_scope
  end
end

Instance Method Details

#local_variable_scopeParser::AST::Node

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.

Return local variable root

Returns:

  • (Parser::AST::Node)


27
28
29
# File 'lib/unparser/emitter.rb', line 27

def local_variable_scope
  AST::LocalVariableScope.new(node)
end