Class: Emailbutler::Configuration
- Inherits:
-
Object
- Object
- Emailbutler::Configuration
- Defined in:
- lib/emailbutler/configuration.rb
Constant Summary collapse
- InitializeError =
Class.new(StandardError)
- AVAILABLE_ADAPTERS =
%w[Emailbutler::Adapters::ActiveRecord].freeze
- AVAILABLE_PROVIDERS =
%w[sendgrid smtp2go resend mailjet mailtrap mandrill].freeze
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#mapping ⇒ Object
readonly
Returns the value of attribute mapping.
-
#providers ⇒ Object
Returns the value of attribute providers.
-
#ui_password ⇒ Object
Returns the value of attribute ui_password.
-
#ui_secured_environments ⇒ Object
Returns the value of attribute ui_secured_environments.
-
#ui_username ⇒ Object
Returns the value of attribute ui_username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/emailbutler/configuration.rb', line 12 def initialize @adapter = nil @providers = [] @mapping = true # It's required to specify these 3 variables to enable basic auth to UI @ui_username = '' @ui_password = '' # Secured environments variable must directly contains environment names @ui_secured_environments = [] end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
10 11 12 |
# File 'lib/emailbutler/configuration.rb', line 10 def adapter @adapter end |
#mapping ⇒ Object (readonly)
Returns the value of attribute mapping.
10 11 12 |
# File 'lib/emailbutler/configuration.rb', line 10 def mapping @mapping end |
#providers ⇒ Object
Returns the value of attribute providers.
10 11 12 |
# File 'lib/emailbutler/configuration.rb', line 10 def providers @providers end |
#ui_password ⇒ Object
Returns the value of attribute ui_password.
10 11 12 |
# File 'lib/emailbutler/configuration.rb', line 10 def ui_password @ui_password end |
#ui_secured_environments ⇒ Object
Returns the value of attribute ui_secured_environments.
10 11 12 |
# File 'lib/emailbutler/configuration.rb', line 10 def ui_secured_environments @ui_secured_environments end |
#ui_username ⇒ Object
Returns the value of attribute ui_username.
10 11 12 |
# File 'lib/emailbutler/configuration.rb', line 10 def ui_username @ui_username end |
Instance Method Details
#validate ⇒ Object
24 25 26 |
# File 'lib/emailbutler/configuration.rb', line 24 def validate raise InitializeError, 'Invalid adapter' if adapter.nil? end |