Module: Enumerable
- Defined in:
- lib/parallel_enumerable.rb
Instance Method Summary collapse
- #_each(options = {}, &block) ⇒ Object
- #_each_with_index(options = {}, &block) ⇒ Object
- #_map(options = {}, &block) ⇒ Object
- #_map_with_index(options = {}, &block) ⇒ Object
Instance Method Details
#_each(options = {}, &block) ⇒ Object
10 11 12 |
# File 'lib/parallel_enumerable.rb', line 10 def _each( = {}, &block) ::Parallel.each(self.to_a, , &block) end |
#_each_with_index(options = {}, &block) ⇒ Object
14 15 16 |
# File 'lib/parallel_enumerable.rb', line 14 def _each_with_index( = {}, &block) ::Parallel.each_with_index(self.to_a, , &block) end |
#_map(options = {}, &block) ⇒ Object
6 7 8 |
# File 'lib/parallel_enumerable.rb', line 6 def _map( = {}, &block) ::Parallel.map(self.to_a, , &block) end |
#_map_with_index(options = {}, &block) ⇒ Object
18 19 20 |
# File 'lib/parallel_enumerable.rb', line 18 def _map_with_index( = {}, &block) ::Parallel.map_with_index(self.to_a, , &block) end |