Class: Frontman::Iterator

Inherits:
Object
  • Object
show all
Defined in:
lib/frontman/iterator.rb

Class Method Summary collapse

Class Method Details

.each(collection, *options, &block) ⇒ Object



13
14
15
# File 'lib/frontman/iterator.rb', line 13

def each(collection, *options, &block)
  forward(:each, collection, *options, &block)
end

.each_with_index(collection, *options, &block) ⇒ Object



21
22
23
# File 'lib/frontman/iterator.rb', line 21

def each_with_index(collection, *options, &block)
  forward(:each_with_index, collection, *options, &block)
end

.map(collection, *options, &block) ⇒ Object



9
10
11
# File 'lib/frontman/iterator.rb', line 9

def map(collection, *options, &block)
  forward(:map, collection, *options, &block)
end

.map_with_index(collection, *options, &block) ⇒ Object



17
18
19
# File 'lib/frontman/iterator.rb', line 17

def map_with_index(collection, *options, &block)
  forward(:map_with_index, collection, *options, &block)
end

.processor_countObject



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