Class: T::Private::Types::NotTyped
- Inherits:
-
Types::Base
- Object
- Types::Base
- T::Private::Types::NotTyped
- Defined in:
- lib/types/private/types/not_typed.rb
Overview
A placeholder for when an untyped thing must provide a type. Raises an exception if it is ever used for validation.
Constant Summary collapse
- ERROR_MESSAGE =
"Validation is being done on a `NotTyped`. Please report this bug at https://github.com/sorbet/sorbet/issues"
- INSTANCE =
::T::Private::Types::NotTyped.new.freeze
Instance Method Summary collapse
- #build_type ⇒ Object
-
#name ⇒ Object
overrides Base.
-
#valid?(obj) ⇒ Boolean
overrides Base.
Methods inherited from Types::Base
#==, #describe_obj, #error_message_for_obj, #error_message_for_obj_recursive, #hash, method_added, #recursively_valid?, #subtype_of?, #to_s, #validate!
Instance Method Details
#build_type ⇒ Object
9 10 11 |
# File 'lib/types/private/types/not_typed.rb', line 9 def build_type nil end |
#name ⇒ Object
overrides Base
14 15 16 |
# File 'lib/types/private/types/not_typed.rb', line 14 def name "<NOT-TYPED>" end |
#valid?(obj) ⇒ Boolean
overrides Base
19 20 21 |
# File 'lib/types/private/types/not_typed.rb', line 19 def valid?(obj) raise ERROR_MESSAGE end |