Class: ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Entities::StepAwareEnumerables::ChainEnumerator
- Inherits:
-
Enumerator
- Object
- Base
- Enumerable
- Enumerator
- ConvenientService::Service::Plugins::CanHaveStepAwareEnumerables::Entities::StepAwareEnumerables::ChainEnumerator
show all
- Defined in:
- lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb
Instance Attribute Summary
Attributes inherited from Base
#modifiers, #object, #organizer, #propagated_result
Instance Method Summary
collapse
Methods inherited from Enumerator
#default_data_key, #default_evaluate_by, #with_index, #with_object
Methods inherited from Enumerable
#all?, #any?, #chain, #chunk, #chunk_while, #collect, #collect_concat, #compact, #count, #cycle, #default_data_key, #default_evaluate_by, #detect, #drop, #drop_while, #each_with_object, #entries, #filter, #filter_map, #find, #find_all, #find_index, #first, #flat_map, #grep, #grep_v, #group_by, #include?, #inject, #lazy, #map, #max, #max_by, #member?, #min, #min_by, #minmax, #minmax_by, #none?, #one?, #partition, #reduce, #reject, #select, #select_exactly, #slice_after, #slice_before, #slice_when, #sort, #sort_by, #sum, #take, #take_while, #tally, #to_a, #to_h, #to_set, #uniq, #zip
Methods inherited from Base
#default_data_key, #evaluate_by, #initialize, #result
abstract_method
Instance Method Details
55
56
57
58
59
60
61
62
63
64
65
|
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb', line 55
def each(&iteration_block)
if iteration_block
with_processing_return_value_as_chain_enumerator(arguments(&iteration_block)) do |&step_aware_iteration_block|
enumerable.each(&step_aware_iteration_block)
end
else
with_processing_return_value_as_chain_enumerator do
enumerable.each
end
end
end
|
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb', line 79
def each_cons(n, &iteration_block)
if iteration_block
with_processing_return_value_as_chain_enumerator(arguments(n, &iteration_block)) do |n, &step_aware_iteration_block|
enumerable.each_cons(n, &step_aware_iteration_block)
end
else
with_processing_return_value_as_chain_enumerator(arguments(n)) do |n|
enumerable.each_cons(n)
end
end
end
|
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb', line 102
def each_entry(&iteration_block)
if iteration_block
with_processing_return_value_as_chain_enumerator(arguments(&iteration_block)) do |&step_aware_iteration_block|
enumerable.each_entry(&step_aware_iteration_block)
end
else
with_processing_return_value_as_chain_enumerator do
enumerable.each_entry
end
end
end
|
126
127
128
129
130
131
132
133
134
135
136
|
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb', line 126
def each_slice(n, &iteration_block)
if iteration_block
with_processing_return_value_as_chain_enumerator(arguments(n, &iteration_block)) do |n, &step_aware_iteration_block|
enumerable.each_slice(n, &step_aware_iteration_block)
end
else
with_processing_return_value_as_chain_enumerator(arguments(n)) do |n|
enumerable.each_slice(n)
end
end
end
|
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb', line 32
def each_with_index(&iteration_block)
if iteration_block
with_processing_return_value_as_chain_enumerator(arguments(&iteration_block)) do |&step_aware_iteration_block|
enumerable.each_with_index(&step_aware_iteration_block)
end
else
with_processing_return_value_as_chain_enumerator do
enumerable.each_with_index
end
end
end
|
149
150
151
152
153
154
155
156
157
158
159
|
# File 'lib/convenient_service/service/plugins/can_have_step_aware_enumerables/entities/step_aware_enumerables/chain_enumerator.rb', line 149
def reverse_each(&iteration_block)
if iteration_block
with_processing_return_value_as_chain_enumerator(arguments(&iteration_block)) do |&step_aware_iteration_block|
enumerable.reverse_each(&step_aware_iteration_block)
end
else
with_processing_return_value_as_chain_enumerator do
enumerable.reverse_each
end
end
end
|