Class: Courrier::Configuration::Providers
- Inherits:
-
Object
- Object
- Courrier::Configuration::Providers
show all
- Defined in:
- lib/courrier/configuration/providers.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Providers.
6
7
8
|
# File 'lib/courrier/configuration/providers.rb', line 6
def initialize
@providers = {}
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name) ⇒ Object
10
11
12
|
# File 'lib/courrier/configuration/providers.rb', line 10
def method_missing(name, *, **)
@providers[name.to_sym] ||= ProviderConfig.new
end
|
Instance Method Details
#[](provider_name) ⇒ Object
16
17
18
|
# File 'lib/courrier/configuration/providers.rb', line 16
def [](provider_name)
@providers[provider_name.to_sym] ||= ProviderConfig.new
end
|
#respond_to_missing?(name, include_private = false) ⇒ Boolean
14
|
# File 'lib/courrier/configuration/providers.rb', line 14
def respond_to_missing?(name, include_private = false) = true
|
#to_h ⇒ Object
20
|
# File 'lib/courrier/configuration/providers.rb', line 20
def to_h = @providers.transform_values(&:to_h)
|