class KnapsackPro::Queue

Public Class Methods

new() click to toggle source
# File lib/knapsack_pro/queue.rb, line 7
def initialize
  @batches = []
end

Public Instance Methods

[](index) click to toggle source
# File lib/knapsack_pro/queue.rb, line 36
def [](index)
  @batches[index]
end
add_batch_for(test_file_paths) click to toggle source
# File lib/knapsack_pro/queue.rb, line 15
def add_batch_for(test_file_paths)
  return if test_file_paths.empty?
  @batches << KnapsackPro::Batch.new(test_file_paths)
end
current_batch() click to toggle source
# File lib/knapsack_pro/queue.rb, line 28
def current_batch
  @batches.last
end
each(&block) click to toggle source
# File lib/knapsack_pro/queue.rb, line 11
def each(&block)
  @batches.each(&block)
end
mark_batch_failed() click to toggle source
# File lib/knapsack_pro/queue.rb, line 24
def mark_batch_failed
  current_batch._failed
end
mark_batch_passed() click to toggle source
# File lib/knapsack_pro/queue.rb, line 20
def mark_batch_passed
  current_batch._passed
end
size() click to toggle source
# File lib/knapsack_pro/queue.rb, line 32
def size
  @batches.size
end