class RandomSet::CustomGenerator
@api private
Attributes
block[R]
Public Class Methods
new(block)
click to toggle source
# File lib/random_set/template.rb, line 92 def initialize(block) @block = block @iteration = 0 end
Public Instance Methods
next()
click to toggle source
# File lib/random_set/template.rb, line 99 def next if block.arity == 1 block.call @iteration else block.call end ensure @iteration += 1 end