Class: T::Private::Types::NotTyped

Inherits:
Types::Base show all
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 to #dev-productivity."

Instance Method Summary collapse

Methods inherited from Types::Base

#==, #describe_obj, #error_message_for_obj, #hash, method_added, #subtype_of?, #to_s, #validate!

Instance Method Details

#nameObject



10
11
12
# File 'lib/types/private/types/not_typed.rb', line 10

def name
  "<NOT-TYPED>"
end

#valid?(obj) ⇒ Boolean

Returns:

Raises:



15
16
17
# File 'lib/types/private/types/not_typed.rb', line 15

def valid?(obj)
  raise ERROR_MESSAGE
end