Sha256: 1fc03b8ebaa0d2f3522d0003a741c4f93925afab1f0127c1dec9e0313e11f64c

Contents?: true

Size: 982 Bytes

Versions: 12

Compression:

Stored size: 982 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.4.0
module Qonfig::Plugins::AccessMixin
  # @param plugin_name [Symbol, String]
  # @return [void]
  #
  # @see Qonfig::Plugins
  #
  # @api public
  # @since 0.4.0
  def plugin(plugin_name)
    Qonfig::Plugins.load(plugin_name)
  end
  alias_method :enable, :plugin
  alias_method :load, :plugin

  # @return [Array<String>]
  #
  # @see Qonfig::Plugins
  #
  # @api public
  # @since 0.4.0
  def plugins
    Qonfig::Plugins.names
  end

  # @return [Array<String>]
  #
  # @api private
  # @since 0.19.0
  def loaded_plugins
    Qonfig::Plugins.loaded_plugins
  end
  alias_method :enabled_plugins, :loaded_plugins

  # @param plugin_name [String, Symbol]
  # @param plugin_klass [Class<Qonfig::Plugins::Abstract>]
  # @return [void]
  #
  # @see Qonfig::Plugins
  #
  # @api public
  # @since 0.12.0
  def register_plugin(plugin_name, plugin_klass)
    Qonfig::Plugins.register_plugin(plugin_name, plugin_klass)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
qonfig-0.28.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.27.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.26.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.25.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.24.1 lib/qonfig/plugins/access_mixin.rb
qonfig-0.24.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.23.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.22.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.21.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.20.0 lib/qonfig/plugins/access_mixin.rb
qonfig-0.19.1 lib/qonfig/plugins/access_mixin.rb
qonfig-0.19.0 lib/qonfig/plugins/access_mixin.rb