Class: Lluminary::Config
- Inherits:
-
Object
- Object
- Lluminary::Config
- Defined in:
- lib/lluminary/config.rb
Overview
Configuration class for Lluminary framework. Handles global settings and provider configurations.
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #provider(name, **options) ⇒ Object
- #provider_config(provider_name) ⇒ Object
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/lluminary/config.rb', line 8 def initialize @providers = {} end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
12 13 14 |
# File 'lib/lluminary/config.rb', line 12 def configure yield self end |
#provider(name, **options) ⇒ Object
16 17 18 |
# File 'lib/lluminary/config.rb', line 16 def provider(name, **) @providers[name.to_sym] = end |
#provider_config(provider_name) ⇒ Object
20 21 22 |
# File 'lib/lluminary/config.rb', line 20 def provider_config(provider_name) @providers[provider_name.to_sym] || {} end |
#reset! ⇒ Object
24 25 26 |
# File 'lib/lluminary/config.rb', line 24 def reset! @providers = {} end |