class TypeProf::Core::AST::LocalVariableReadNode::LocalVariableWriteNode::InstanceVariableReadNode::InstanceVariableWriteNode::GlobalVariableReadNode

Attributes

var[R]

Public Class Methods

new(raw_node, lenv) click to toggle source
Calls superclass method TypeProf::Core::AST::Node::new
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 141
def initialize(raw_node, lenv)
  super(raw_node, lenv)
  @var = raw_node.name
end

Public Instance Methods

attrs(= { var: }) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 148
  def attrs = { var: }

  def install0(genv)
    box = @changes.add_gvar_read_box(genv, @var)
    box.ret
  end

  def retrieve_at(pos)
    yield self if code_range.include?(pos)
  end
end
install0(genv) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 150
def install0(genv)
  box = @changes.add_gvar_read_box(genv, @var)
  box.ret
end
retrieve_at(pos) { |self| ... } click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 155
def retrieve_at(pos)
  yield self if code_range.include?(pos)
end