Sha256: c48639db4a9a2d7942ae0d04d30ab7284149280a394beb298cce57761f3ba946
Contents?: true
Size: 467 Bytes
Versions: 15
Compression:
Stored size: 467 Bytes
Contents
# frozen_string_literal: true module Montrose module Rule class Total include Montrose::Rule def self.apply_options(opts) opts[:total] end def initialize(max) @max = max @count = 0 end def include?(time) continue?(time) end def advance!(time) @count += 1 continue?(time) end def continue?(_time) @count <= @max end end end end
Version data entries
15 entries across 15 versions & 1 rubygems