Module: TypeProf::Core::TypeAliasRead

Included in:
BaseTypeAliasRead, ScopedTypeAliasRead
Defined in:
lib/typeprof/core/env/static_read.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#type_alias_entityObject (readonly)

Returns the value of attribute type_alias_entity.



146
147
148
# File 'lib/typeprof/core/env/static_read.rb', line 146

def type_alias_entity
  @type_alias_entity
end

Instance Method Details

#check_module(genv, mod) ⇒ Object



126
127
128
129
130
131
132
133
# File 'lib/typeprof/core/env/static_read.rb', line 126

def check_module(genv, mod)
  tae = mod.type_aliases[@name]
  if tae && tae.exist?
    update_type_alias(genv, tae)
    return true
  end
  return false
end

#resolution_failed(genv) ⇒ Object



135
136
137
# File 'lib/typeprof/core/env/static_read.rb', line 135

def resolution_failed(genv)
  update_type_alias(genv, nil)
end

#update_type_alias(genv, tae) ⇒ Object



139
140
141
142
143
144
# File 'lib/typeprof/core/env/static_read.rb', line 139

def update_type_alias(genv, tae)
  if tae != @type_alias_entity
    @type_alias_entity = tae
    propagate(genv)
  end
end