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



44
45
46
47
48
# File 'lib/unparser/emitter.rb', line 44

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)


40
41
42
# File 'lib/unparser/emitter.rb', line 40

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