Sha256: bee7d79a3410254b6ed7e8010d60d038a398f30133e10873b743e6a7f00212ad
Contents?: true
Size: 583 Bytes
Versions: 20
Compression:
Stored size: 583 Bytes
Contents
# encoding: utf-8 module Punchblock class Client class ComponentRegistry def initialize @mutex = Mutex.new @components = Hash.new end def <<(component) @mutex.synchronize do @components[component.source_uri] = component end end def find_by_uri(uri) @mutex.synchronize do @components[uri] end end def delete(component) @mutex.synchronize do uri = @components.key component @components.delete uri end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems