Sha256: ed903e656f66ca3b4c56e391f9913e4d8719f68c4cc6e587dc911b8fd4310000
Contents?: true
Size: 618 Bytes
Versions: 15
Compression:
Stored size: 618 Bytes
Contents
# frozen_string_literal: true # typed: true module T::Types class TypedSet < TypedEnumerable attr_reader :type def underlying_class Hash end # overrides Base def name "T::Set[#{@type.name}]" end # overrides Base def recursively_valid?(obj) obj.is_a?(Set) && super end # overrides Base def valid?(obj) obj.is_a?(Set) end def new(*args) Set.new(*T.unsafe(args)) end class Untyped < TypedSet def initialize super(T.untyped) end def valid?(obj) obj.is_a?(Set) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems