Class: TypeProf::Core::ScopedStaticRead
- Inherits:
-
StaticRead
- Object
- StaticRead
- TypeProf::Core::ScopedStaticRead
- Defined in:
- lib/typeprof/core/env/static_read.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from StaticRead
Instance Method Summary collapse
-
#initialize(name, cbase, strict_const_scope) ⇒ ScopedStaticRead
constructor
A new instance of ScopedStaticRead.
- #on_cbase_updated(genv) ⇒ Object
Methods inherited from StaticRead
#destroy, #propagate, #resolve
Constructor Details
#initialize(name, cbase, strict_const_scope) ⇒ ScopedStaticRead
Returns a new instance of ScopedStaticRead.
74 75 76 77 78 79 |
# File 'lib/typeprof/core/env/static_read.rb', line 74 def initialize(name, cbase, strict_const_scope) super(name) @cbase = cbase @cbase.followers << self if @cbase @search_ancestors = !strict_const_scope end |
Instance Method Details
#on_cbase_updated(genv) ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/typeprof/core/env/static_read.rb', line 81 def on_cbase_updated(genv) if @cbase && @cbase.cpath resolve(genv, CRef.new(@cbase.cpath, :class, nil, nil), @search_ancestors, true) else resolution_failed(genv) end end |