Class: T::Types::TypedEnumerator::Untyped

Inherits:
T::Types::TypedEnumerator show all
Defined in:
lib/types/types/typed_enumerator.rb

Instance Method Summary collapse

Methods inherited from T::Types::TypedEnumerator

#name, #new, #recursively_valid?, #underlying_class

Methods inherited from T::Types::TypedEnumerable

#build_type, #describe_obj, #name, #recursively_valid?, #type, #underlying_class

Methods inherited from Base

#==, #build_type, #describe_obj, #error_message_for_obj, #error_message_for_obj_recursive, #hash, method_added, #name, #recursively_valid?, #subtype_of?, #to_s, #validate!

Constructor Details

#initializeUntyped

Returns a new instance of Untyped.



30
31
32
# File 'lib/types/types/typed_enumerator.rb', line 30

def initialize
  super(T.untyped)
end

Instance Method Details

#valid?(obj) ⇒ Boolean

Returns:



34
35
36
# File 'lib/types/types/typed_enumerator.rb', line 34

def valid?(obj)
  obj.is_a?(Enumerator)
end