Sha256: 387e58e002cec6d1b21d0bf064ba418bf683ddf3ca323ad1e43e4bae37f13b34
Contents?: true
Size: 760 Bytes
Versions: 9
Compression:
Stored size: 760 Bytes
Contents
module MailerLite # A class responsible for all configurations. class Configuration # Default API endpoint. API_ENDPOINT = 'https://api.mailerlite.com/api/v2'.freeze # Default User Agent header string. USER_AGENT = "MailerLite Ruby v#{MailerLite::VERSION}".freeze attr_accessor :api_key attr_writer :url, :user_agent # Takes url provided from configuration or uses default one. # # @return [String] An API Endpoint url which will be used for connection. def url @url || API_ENDPOINT end # Takes user agent from configuration or uses default one. # # @return [String] User agent which will be used for connection headers. def user_agent @user_agent || USER_AGENT end end end
Version data entries
9 entries across 9 versions & 1 rubygems