Sha256: 7c5ad45078cd8d5029a96a33baf294c2f2da43be766c674e1bd2da80e60e39a1
Contents?: true
Size: 818 Bytes
Versions: 414
Compression:
Stored size: 818 Bytes
Contents
# frozen_string_literal: true # typed: true # A marking class for when methods return void. # Should never appear in types directly. class T::Private::Types::Void < T::Types::Base ERROR_MESSAGE = "Validation is being done on an `Void`. Please report to #dev-productivity." # The actual return value of `.void` methods. # # Uses `Module.new` because in Ruby an anonymous module will inherit the name # of the constant it's assigned to. This gives it a readable name someone # examines it in Pry or with `#inspect` like: # # T::Private::Types::Void::VOID # VOID = Module.new.freeze # @override Base def name "<VOID>" end # @override Base def valid?(obj) raise ERROR_MESSAGE end # @override Base private def subtype_of_single?(other) raise ERROR_MESSAGE end end
Version data entries
414 entries across 414 versions & 1 rubygems