Module: Pangea::ComponentRegistry

Defined in:
lib/pangea/component_registry.rb

Class Method Summary collapse

Class Method Details

.clear!Object



35
36
37
# File 'lib/pangea/component_registry.rb', line 35

def clear!
  @mutex.synchronize { @components.clear }
end

.register_component(component_module) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/pangea/component_registry.rb', line 23

def register_component(component_module)
  @mutex.synchronize do
    unless @components.include?(component_module)
      @components << component_module
    end
  end
end

.registered?(component_module) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/pangea/component_registry.rb', line 39

def registered?(component_module)
  @mutex.synchronize { @components.include?(component_module) }
end

.registered_componentsObject



31
32
33
# File 'lib/pangea/component_registry.rb', line 31

def registered_components
  @mutex.synchronize { @components.dup }
end