Class: T::Types::TypedEnumeratorChain
- Inherits:
-
TypedEnumerable
- Object
- Base
- TypedEnumerable
- T::Types::TypedEnumeratorChain
- Defined in:
- lib/types/types/typed_enumerator_chain.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Untyped
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#name ⇒ Object
overrides Base.
- #new(*args, &blk) ⇒ Object
-
#recursively_valid?(obj) ⇒ Boolean
overrides Base.
- #underlying_class ⇒ Object
-
#valid?(obj) ⇒ Boolean
overrides Base.
Methods inherited from TypedEnumerable
Methods inherited from Base
#==, #describe_obj, #error_message_for_obj, #error_message_for_obj_recursive, #hash, method_added, #subtype_of?, #to_s, #validate!
Constructor Details
This class inherits a constructor from T::Types::TypedEnumerable
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/types/types/typed_enumerator_chain.rb', line 6 def type @type end |
Instance Method Details
#name ⇒ Object
overrides Base
13 14 15 |
# File 'lib/types/types/typed_enumerator_chain.rb', line 13 def name "T::Enumerator::Chain[#{@type.name}]" end |
#new(*args, &blk) ⇒ Object
27 28 29 |
# File 'lib/types/types/typed_enumerator_chain.rb', line 27 def new(*args, &blk) T.unsafe(Enumerator::Chain).new(*args, &blk) end |
#recursively_valid?(obj) ⇒ Boolean
overrides Base
18 19 20 |
# File 'lib/types/types/typed_enumerator_chain.rb', line 18 def recursively_valid?(obj) obj.is_a?(Enumerator::Chain) && super end |
#underlying_class ⇒ Object
8 9 10 |
# File 'lib/types/types/typed_enumerator_chain.rb', line 8 def Enumerator::Chain end |
#valid?(obj) ⇒ Boolean
overrides Base
23 24 25 |
# File 'lib/types/types/typed_enumerator_chain.rb', line 23 def valid?(obj) obj.is_a?(Enumerator::Chain) end |