Module: AnyCache::Plugins

Defined in:
lib/any_cache/plugins.rb

Overview

Since:

  • 0.5.0

Defined Under Namespace

Modules: InterfaceAccessMixin Classes: Abstract, Registry

Class Method Summary collapse

Class Method Details

.load(plugin_name) ⇒ void

This method returns an undefined value.

Parameters:

  • plugin_name (Symbol, String)

Since:

  • 0.5.0



21
22
23
# File 'lib/any_cache/plugins.rb', line 21

def load(plugin_name)
  thread_safe { plugin_registry[plugin_name].load! }
end

.namesArray<String>

Returns:

  • (Array<String>)

Since:

  • 0.5.0



29
30
31
# File 'lib/any_cache/plugins.rb', line 29

def names
  thread_safe { plugin_registry.names }
end

.register(plugin_name, plugin_module) ⇒ 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.

This method returns an undefined value.

Parameters:

  • plugin_name (Symbol, String)

Since:

  • 0.5.0



38
39
40
# File 'lib/any_cache/plugins.rb', line 38

def register(plugin_name, plugin_module)
  thread_safe { plugin_registry[plugin_name] = plugin_module }
end