Class: AnyCache::Plugins::Registry Private
- Inherits:
-
Object
- Object
- AnyCache::Plugins::Registry
- Defined in:
- lib/any_cache/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) ⇒ AnyCache::Plugins::Abstract 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.
10 11 12 13 |
# File 'lib/any_cache/plugins/registry.rb', line 10 def initialize @plugin_set = {} @access_lock = Mutex.new end |
Instance Method Details
#[](plugin_name) ⇒ AnyCache::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.
20 21 22 |
# File 'lib/any_cache/plugins/registry.rb', line 20 def [](plugin_name) thread_safe { fetch(plugin_name) } 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.
39 40 41 |
# File 'lib/any_cache/plugins/registry.rb', line 39 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.
30 31 32 |
# File 'lib/any_cache/plugins/registry.rb', line 30 def register(plugin_name, plugin_module) thread_safe { apply(plugin_name, plugin_module) } end |