Sha256: a3162c100faeae89bf8811b3ec19dd1b712bc0ed5467cad7d1f0a41a4ec9e354
Contents?: true
Size: 876 Bytes
Versions: 28
Compression:
Stored size: 876 Bytes
Contents
module RBS module Resolver # TypeNameResolver resolves given relative type name to absolute type name under a module nesting context. # # The type name resolution doesn't take account of ancestors of modules. # It just ignores included modules and super classes. # class TypeNameResolver type query = [TypeName, context] def initialize: (Environment) -> void # Translates given type name to absolute type name. # Returns `nil` if cannot find associated type name. # def resolve: (TypeName, context: context) -> TypeName? private attr_reader all_names: Set[TypeName] attr_reader cache: Hash[query, TypeName?] def has_name?: (TypeName) -> TypeName? def try_cache: (query) { () -> TypeName? } -> TypeName? def resolve_in: (TypeName, context) -> TypeName? end end end
Version data entries
28 entries across 28 versions & 2 rubygems