Class: Lluminary::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/lluminary/config.rb

Overview

Configuration class for Lluminary framework. Handles global settings and provider configurations.

Instance Method Summary collapse

Constructor Details

#initializeConfig

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

Yields:

  • (_self)

Yield Parameters:



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, **options)
  @providers[name.to_sym] = options
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