Class: Lita::DefaultConfiguration Private
- Inherits:
-
Object
- Object
- Lita::DefaultConfiguration
- Defined in:
- lib/lita/default_configuration.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.
Builds the configuration object that is stored in each Registry.
Constant Summary collapse
- LOG_LEVELS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Valid levels for Lita’s logger.
%w(debug info warn error fatal)
Instance Attribute Summary collapse
-
#registry ⇒ Lita::Registry
readonly
private
A Registry to extract configuration for plugins from.
-
#root ⇒ Lita::Configuration
readonly
private
The top-level ConfigurationBuilder attribute.
Instance Method Summary collapse
-
#build ⇒ Lita::Configuration
private
Processes the ConfigurationBuilder object to return a Configuration.
-
#initialize(registry) ⇒ DefaultConfiguration
constructor
private
A new instance of DefaultConfiguration.
Constructor Details
#initialize(registry) ⇒ DefaultConfiguration
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.
Returns a new instance of DefaultConfiguration.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/lita/default_configuration.rb', line 18 def initialize(registry) @registry = registry @root = ConfigurationBuilder.new adapters_config handlers_config http_config redis_config robot_config end |
Instance Attribute Details
#registry ⇒ Lita::Registry (readonly)
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.
A Registry to extract configuration for plugins from.
11 12 13 |
# File 'lib/lita/default_configuration.rb', line 11 def registry @registry end |
#root ⇒ Lita::Configuration (readonly)
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 top-level ConfigurationBuilder attribute.
15 16 17 |
# File 'lib/lita/default_configuration.rb', line 15 def root @root end |
Instance Method Details
#build ⇒ Lita::Configuration
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.
Processes the ConfigurationBuilder object to return a Configuration.
31 32 33 34 35 36 |
# File 'lib/lita/default_configuration.rb', line 31 def build final_config = root.build add_adapter_attribute(final_config) add_struct_access_to_redis(final_config.redis) final_config end |