Sha256: 519cb174b1f502f7495800a22aef0b21968d562cbbed3c5bd156fb6e9992e5f0
Contents?: true
Size: 807 Bytes
Versions: 26
Compression:
Stored size: 807 Bytes
Contents
# frozen_string_literal: true # typed: true module T::Types # Modeling AttachedClass properly at runtime would require additional # tracking, so at runtime we permit all values and rely on the static checker. # As AttachedClass is modeled statically as a type member on every singleton # class, this is consistent with the runtime behavior for all type members. class AttachedClassType < Base def initialize(); end # @override Base def name "AttachedClass" end # @override Base def valid?(obj) true end # @override Base private def subtype_of_single?(other) case other when AttachedClassType true else false end end module Private INSTANCE = AttachedClassType.new.freeze end end end
Version data entries
26 entries across 26 versions & 1 rubygems