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.
Instance Attribute Summary collapse
-
#configuration_builder ⇒ Lita::ConfigurationBuilder
private
The plugins’s ConfigurationBuilder object.
Instance Method Summary collapse
-
#config(*args, **kwargs, &block) ⇒ void
private
Sets a configuration attribute on the plugin.
-
#inherited(klass) ⇒ Object
private
Initializes the configuration builder for any inheriting classes.
Instance Attribute Details
#configuration_builder ⇒ Lita::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.
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.
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.
24 25 26 27 |
# File 'lib/lita/configurable.rb', line 24 def inherited(klass) super klass.configuration_builder = ConfigurationBuilder.new end |