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

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

Instance Attribute Summary

Attributes inherited from T::Types::TypedEnumerator

#type

Attributes inherited from T::Types::TypedEnumerable

#type

Instance Method Summary collapse

Methods inherited from T::Types::TypedEnumerator

#name, #new, #underlying_class

Methods inherited from T::Types::TypedEnumerable

#describe_obj, #name, #underlying_class

Methods inherited from Base

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

Constructor Details

#initializeUntyped

Returns a new instance of Untyped.



27
28
29
# File 'lib/types/types/typed_enumerator.rb', line 27

def initialize
  super(T.untyped)
end

Instance Method Details

#valid?(obj) ⇒ Boolean

Returns:



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

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