Class: TypeProf::Core::BaseStaticRead

Inherits:
StaticRead
  • Object
show all
Defined in:
lib/typeprof/core/env/static_read.rb

Direct Known Subclasses

BaseConstRead, BaseTypeAliasRead

Instance Attribute Summary collapse

Attributes inherited from StaticRead

#followers, #name

Instance Method Summary collapse

Methods inherited from StaticRead

#destroy, #propagate, #resolve

Constructor Details

#initialize(genv, name, cref) ⇒ BaseStaticRead

Returns a new instance of BaseStaticRead.



60
61
62
63
64
# File 'lib/typeprof/core/env/static_read.rb', line 60

def initialize(genv, name, cref)
  super(name)
  @cref = cref
  genv.add_static_eval_queue(:static_read_changed, self)
end

Instance Attribute Details

#crefObject (readonly)

Returns the value of attribute cref.



66
67
68
# File 'lib/typeprof/core/env/static_read.rb', line 66

def cref
  @cref
end

Instance Method Details

#on_scope_updated(genv) ⇒ Object



68
69
70
# File 'lib/typeprof/core/env/static_read.rb', line 68

def on_scope_updated(genv)
  resolve(genv, @cref, false)
end