class TypeProf::Core::AST::LocalVariableReadNode::LocalVariableWriteNode::InstanceVariableReadNode::InstanceVariableWriteNode::GlobalVariableReadNode::GlobalVariableWriteNode::PostExecutionNode::ClassVariableWriteNode::ClassVariableReadNode

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 281
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 288
  def attrs = { var: }

  def install0(genv)
    box = @changes.add_cvar_read_box(genv, lenv.cref.cpath, @var)
    @lenv.apply_read_filter(genv, self, @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 290
def install0(genv)
  box = @changes.add_cvar_read_box(genv, lenv.cref.cpath, @var)
  @lenv.apply_read_filter(genv, self, @var, box.ret)
end
retrieve_at(pos) { |self| ... } click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 295
def retrieve_at(pos)
  yield self if code_range.include?(pos)
end