class TypeProf::Core::AST::LocalVariableReadNode::LocalVariableWriteNode::InstanceVariableReadNode
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 54 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 61 def attrs = { var: } def install0(genv) case @lenv.cref.scope_level when :class, :instance box = @changes.add_ivar_read_box(genv, lenv.cref.cpath, lenv.cref.scope_level == :class, @var) @lenv.apply_read_filter(genv, self, @var, box.ret) else Source.new() end 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 63 def install0(genv) case @lenv.cref.scope_level when :class, :instance box = @changes.add_ivar_read_box(genv, lenv.cref.cpath, lenv.cref.scope_level == :class, @var) @lenv.apply_read_filter(genv, self, @var, box.ret) else Source.new() end end
retrieve_at(pos) { |self| ... }
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/variable.rb, line 73 def retrieve_at(pos) yield self if code_range.include?(pos) end