class FuzzBert::Executor::DataProducer::Ring

Public Class Methods

new(objs) click to toggle source
# File lib/fuzzbert/executor.rb, line 153
def initialize(objs)
  @i = 0
  objs = [objs] unless objs.respond_to?(:each)
  @objs = objs.to_a
  raise ArgumentError.new("No test cases found") if @objs.empty?
end

Public Instance Methods

next() click to toggle source
# File lib/fuzzbert/executor.rb, line 160
def next
  obj = @objs[@i]
  @i = (@i + 1) % @objs.size
  obj
end