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.
-
#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.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/emailbutler/configuration.rb', line 14 def initialize @adapter = nil @providers = [] # 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.
12 13 14 |
# File 'lib/emailbutler/configuration.rb', line 12 def adapter @adapter end |
#providers ⇒ Object
Returns the value of attribute providers.
12 13 14 |
# File 'lib/emailbutler/configuration.rb', line 12 def providers @providers end |
#ui_password ⇒ Object
Returns the value of attribute ui_password.
12 13 14 |
# File 'lib/emailbutler/configuration.rb', line 12 def ui_password @ui_password end |
#ui_secured_environments ⇒ Object
Returns the value of attribute ui_secured_environments.
12 13 14 |
# File 'lib/emailbutler/configuration.rb', line 12 def ui_secured_environments @ui_secured_environments end |
#ui_username ⇒ Object
Returns the value of attribute ui_username.
12 13 14 |
# File 'lib/emailbutler/configuration.rb', line 12 def ui_username @ui_username end |
Instance Method Details
#validate ⇒ Object
25 26 27 |
# File 'lib/emailbutler/configuration.rb', line 25 def validate raise InitializeError, 'Invalid adapter' if adapter.nil? end |