Sha256: d11cc26aa5657af6cc63e0a9d6f02f553053c970fe743741f049cc770c70fa83
Contents?: true
Size: 753 Bytes
Versions: 73
Compression:
Stored size: 753 Bytes
Contents
module Steep module Subtyping class Cache attr_reader :subtypes def initialize @subtypes = {} end def subtype(relation, self_type, instance_type, class_type, bounds) key = [relation, self_type, instance_type, class_type, bounds] subtypes[key] end def [](relation, self_type, instance_type, class_type, bounds) key = [relation, self_type, instance_type, class_type, bounds] subtypes[key] end def []=(relation, self_type, instance_type, class_type, bounds, value) key = [relation, self_type, instance_type, class_type, bounds] subtypes[key] = value end def no_subtype_cache? @subtypes.empty? end end end end
Version data entries
73 entries across 73 versions & 3 rubygems