Sha256: 35df6ba6ca40f69a8f2b184b420a544be002483a6480f077b80fdda1fb8261d1

Contents?: true

Size: 302 Bytes

Versions: 68

Compression:

Stored size: 302 Bytes

Contents

module HQMF
  # Simple class to issue monotonically increasing integer identifiers
  class InstanceCounter
    def initialize
      @count=0
    end

    def reset
      @count=0
    end

    def next
      @count+=1
    end
  end

  class Counter < InstanceCounter
    include Singleton
  end
end    

Version data entries

68 entries across 68 versions & 3 rubygems

Version Path
cqm-parsers-4.1.1.0 lib/util/counter.rb
cqm-parsers-4.1.0.2 lib/util/counter.rb
cqm-parsers-4.1.0.1 lib/util/counter.rb
cqm-parsers-4.1.0.0 lib/util/counter.rb
cqm-parsers-4.0.0.1 lib/util/counter.rb
cqm-parsers-3.2.0.2 lib/util/counter.rb
cqm-parsers-4.0.0.0 lib/util/counter.rb
cqm-parsers-3.2.0.1 lib/util/counter.rb
cqm-parsers-3.2.0.0 lib/util/counter.rb
cqm-parsers-3.1.1.0 lib/util/counter.rb
cqm-parsers-3.1.0.0 lib/util/counter.rb
cqm-parsers-3.0.0.0 lib/util/counter.rb
cqm-parsers-2.0.1 lib/util/counter.rb
cqm-parsers-0.2.4 lib/util/counter.rb
cqm-parsers-2.0.0 lib/util/counter.rb
health-data-standards-4.3.5 lib/util/counter.rb
cqm-parsers-0.2.3 lib/util/counter.rb
health-data-standards-4.3.4 lib/util/counter.rb
cqm-parsers-0.2.2 lib/util/counter.rb
health-data-standards-4.3.3 lib/util/counter.rb