class Punchblock::Client::ComponentRegistry
Public Class Methods
new()
click to toggle source
# File lib/punchblock/client/component_registry.rb, line 6 def initialize @mutex = Mutex.new @components = Hash.new end
Public Instance Methods
<<(component)
click to toggle source
# File lib/punchblock/client/component_registry.rb, line 11 def <<(component) @mutex.synchronize do @components[component.source_uri] = component end end
delete(component)
click to toggle source
# File lib/punchblock/client/component_registry.rb, line 23 def delete(component) @mutex.synchronize do uri = @components.key component @components.delete uri end end
find_by_uri(uri)
click to toggle source
# File lib/punchblock/client/component_registry.rb, line 17 def find_by_uri(uri) @mutex.synchronize do @components[uri] end end