Class: Mailstro::Configuration
- Inherits:
-
Object
- Object
- Mailstro::Configuration
- Defined in:
- lib/mailstro/configuration.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/mailstro/configuration.rb', line 7 def initialize @api_endpoint = 'https://api.mailstroapp.com/v1' end |
Instance Attribute Details
#api_endpoint ⇒ Object
Returns the value of attribute api_endpoint.
3 4 5 |
# File 'lib/mailstro/configuration.rb', line 3 def api_endpoint @api_endpoint end |
#api_key ⇒ Object
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/mailstro/configuration.rb', line 4 def api_key @api_key end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/mailstro/configuration.rb', line 5 def enabled @enabled end |
Instance Method Details
#validate! ⇒ Object
19 20 21 |
# File 'lib/mailstro/configuration.rb', line 19 def validate! raise Error::ConfigurationError, "api_key not provided" if api_key.nil? end |