Class: Frontman::Iterator
- Inherits:
-
Object
- Object
- Frontman::Iterator
- Defined in:
- lib/frontman/iterator.rb
Class Method Summary collapse
- .each(collection, *options, &block) ⇒ Object
- .each_with_index(collection, *options, &block) ⇒ Object
- .map(collection, *options, &block) ⇒ Object
- .map_with_index(collection, *options, &block) ⇒ Object
- .processor_count ⇒ Object
Class Method Details
.each(collection, *options, &block) ⇒ Object
13 14 15 |
# File 'lib/frontman/iterator.rb', line 13 def each(collection, *, &block) forward(:each, collection, *, &block) end |
.each_with_index(collection, *options, &block) ⇒ Object
21 22 23 |
# File 'lib/frontman/iterator.rb', line 21 def each_with_index(collection, *, &block) forward(:each_with_index, collection, *, &block) end |
.map(collection, *options, &block) ⇒ Object
9 10 11 |
# File 'lib/frontman/iterator.rb', line 9 def map(collection, *, &block) forward(:map, collection, *, &block) end |
.map_with_index(collection, *options, &block) ⇒ Object
17 18 19 |
# File 'lib/frontman/iterator.rb', line 17 def map_with_index(collection, *, &block) forward(:map_with_index, collection, *, &block) end |
.processor_count ⇒ Object
25 26 27 28 29 |
# File 'lib/frontman/iterator.rb', line 25 def processor_count return Parallel.processor_count if parallel? Frontman::Config.get(:processor_count, fallback: 1) end |