Class: Qonfig::Plugins::Registry Private
- Inherits:
-
Object
- Object
- Qonfig::Plugins::Registry
- Includes:
- Enumerable
- Defined in:
- lib/qonfig/plugins/registry.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #[](plugin_name) ⇒ Qonfig::Plugins::Abstract private
- #each(&block) ⇒ Enumerable private
- #initialize ⇒ void constructor private
- #names ⇒ Array<String> private
- #register(plugin_name, plugin_module) ⇒ void (also: #[]=) private
Constructor Details
#initialize ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 |
# File 'lib/qonfig/plugins/registry.rb', line 13 def initialize @plugin_set = {} @access_lock = Mutex.new end |
Instance Method Details
#[](plugin_name) ⇒ Qonfig::Plugins::Abstract
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/qonfig/plugins/registry.rb', line 23 def [](plugin_name) thread_safe { fetch(plugin_name) } end |
#each(&block) ⇒ Enumerable
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/qonfig/plugins/registry.rb', line 51 def each(&block) thread_safe { iterate(&block) } end |
#names ⇒ Array<String>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
42 43 44 |
# File 'lib/qonfig/plugins/registry.rb', line 42 def names thread_safe { plugin_names } end |
#register(plugin_name, plugin_module) ⇒ void Also known as: []=
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
33 34 35 |
# File 'lib/qonfig/plugins/registry.rb', line 33 def register(plugin_name, plugin_module) thread_safe { apply(plugin_name, plugin_module) } end |