Sha256: 7a80f4a6bccf1a182920b1b86a4b518515d10af6f9d1b0802f89c970e204537c
Contents?: true
Size: 498 Bytes
Versions: 11
Compression:
Stored size: 498 Bytes
Contents
# typed: true module Datadog module Core module Utils # Generates values from a consistent sequence class Sequence def initialize(seed = 0, &block) @seed = seed @current = seed @next_item = block end def next next_item = @next_item ? @next_item.call(@current) : @current @current += 1 next_item end def reset! @current = @seed end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems