class Mutant::Parallel::Source::Array
Job source backed by a finite array
def initialize(*)
-
(undefined)
-
def initialize(*) super @next_index = 0 end
def next
-
(NoJobError)
-
Returns:
-
(Job)
-
def next fail NoJobError unless next? Job.new(index: @next_index, payload: jobs.fetch(@next_index)).tap do @next_index += 1 end end
def next?
-
(Boolean)
-
def next? @next_index < jobs.length end