Module: Lita::Configurable Private

Included in:
Adapter
Defined in:
lib/lita/configurable.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Mixin to add the ability for a plugin to define configuration.

Since:

  • 4.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configuration_builderLita::ConfigurationBuilder

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.

The plugins's Lita::ConfigurationBuilder object.

Since:

  • 4.0.0


9
10
11
# File 'lib/lita/configurable.rb', line 9

def configuration_builder
  @configuration_builder
end

Instance Method Details

#config(*args, **kwargs, &block) ⇒ 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.

Sets a configuration attribute on the plugin.

See Also:

Since:

  • 4.0.0


15
16
17
18
19
20
21
# File 'lib/lita/configurable.rb', line 15

def config(*args, **kwargs, &block)
  if block
    configuration_builder.config(*args, **kwargs, &block)
  else
    configuration_builder.config(*args, **kwargs)
  end
end

#inherited(klass) ⇒ Object

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.

Initializes the configuration builder for any inheriting classes.

Since:

  • 4.0.0


24
25
26
27
# File 'lib/lita/configurable.rb', line 24

def inherited(klass)
  super
  klass.configuration_builder = ConfigurationBuilder.new
end