Class: T::Types::TypedSet::Untyped
- Inherits:
-
T::Types::TypedSet
- Object
- Base
- T::Types::TypedEnumerable
- T::Types::TypedSet
- T::Types::TypedSet::Untyped
- Defined in:
- lib/types/types/typed_set.rb
Instance Attribute Summary
Attributes inherited from T::Types::TypedSet
Attributes inherited from T::Types::TypedEnumerable
Instance Method Summary collapse
-
#initialize ⇒ Untyped
constructor
A new instance of Untyped.
- #valid?(obj) ⇒ Boolean
Methods inherited from T::Types::TypedSet
#name, #new, #recursively_valid?, #underlying_class
Methods inherited from T::Types::TypedEnumerable
#describe_obj, #name, #recursively_valid?, #underlying_class
Methods inherited from Base
#==, #describe_obj, #error_message_for_obj, #error_message_for_obj_recursive, #hash, method_added, #name, #recursively_valid?, #subtype_of?, #to_s, #validate!
Constructor Details
Instance Method Details
#valid?(obj) ⇒ Boolean
45 46 47 48 49 50 |
# File 'lib/types/types/typed_set.rb', line 45 def valid?(obj) # Re-implements non_forcing_is_a? return false if Object.autoload?(:Set) # Set is meant to be autoloaded but not yet loaded, this value can't be a Set return false unless Object.const_defined?(:Set) # Set is not loaded yet obj.is_a?(Set) end |