Class: T::Types::TypedEnumeratorChain

Inherits:
TypedEnumerable show all
Defined in:
lib/types/types/typed_enumerator_chain.rb

Direct Known Subclasses

Untyped

Defined Under Namespace

Classes: Untyped

Instance Method Summary collapse

Methods inherited from TypedEnumerable

#build_type, #describe_obj, #initialize, #type

Methods inherited from Base

#==, #build_type, #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 Method Details

#nameObject

overrides Base



11
12
13
# File 'lib/types/types/typed_enumerator_chain.rb', line 11

def name
  "T::Enumerator::Chain[#{type.name}]"
end

#new(*args, &blk) ⇒ Object



25
26
27
# File 'lib/types/types/typed_enumerator_chain.rb', line 25

def new(*args, &blk)
  T.unsafe(Enumerator::Chain).new(*args, &blk)
end

#recursively_valid?(obj) ⇒ Boolean

overrides Base

Returns:



16
17
18
# File 'lib/types/types/typed_enumerator_chain.rb', line 16

def recursively_valid?(obj)
  obj.is_a?(Enumerator::Chain) && super
end

#underlying_classObject



6
7
8
# File 'lib/types/types/typed_enumerator_chain.rb', line 6

def underlying_class
  Enumerator::Chain
end

#valid?(obj) ⇒ Boolean

overrides Base

Returns:



21
22
23
# File 'lib/types/types/typed_enumerator_chain.rb', line 21

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