Class: MailerLite::Configuration
- Inherits:
-
Object
- Object
- MailerLite::Configuration
- Defined in:
- lib/mailerlite/configuration.rb
Overview
A class responsible for all configurations.
Constant Summary collapse
- API_ENDPOINT =
Default API endpoint.
'https://api.mailerlite.com/api/v2'- USER_AGENT =
Default User Agent header string.
"MailerLite Ruby v#{MailerLite::VERSION}"
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#url ⇒ String
Takes url provided from configuration or uses default one.
-
#user_agent ⇒ String
Takes user agent from configuration or uses default one.
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
12 13 14 |
# File 'lib/mailerlite/configuration.rb', line 12 def api_key @api_key end |
#timeout ⇒ Object
Returns the value of attribute timeout.
12 13 14 |
# File 'lib/mailerlite/configuration.rb', line 12 def timeout @timeout end |
#url ⇒ String
Takes url provided from configuration or uses default one.
18 19 20 |
# File 'lib/mailerlite/configuration.rb', line 18 def url @url || API_ENDPOINT end |
#user_agent ⇒ String
Takes user agent from configuration or uses default one.
25 26 27 |
# File 'lib/mailerlite/configuration.rb', line 25 def user_agent @user_agent || USER_AGENT end |