Sha256: 66415bd2306d134aeddc5248d236546716a5d0bc476b8080e720bb024ef8eea2

Contents?: true

Size: 309 Bytes

Versions: 3

Compression:

Stored size: 309 Bytes

Contents

require "singleton"

module Rack
  class ECG
    class CheckRegistry
      include Singleton

      def initialize()
        @registry = {}
      end

      def register(name, check_class)
        @registry[name] = check_class
      end

      def [](name)
        @registry[name]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rack-ecg-0.0.4 lib/rack/ecg/check_registry.rb
rack-ecg-0.0.3 lib/rack/ecg/check_registry.rb
rack-ecg-0.0.2 lib/rack/ecg/check_registry.rb