Sha256: d3cddeb42cc5bbedace36b710c0966a0b3fef2f5e8114a818e7308f9e03ad2ab
Contents?: true
Size: 803 Bytes
Versions: 11
Compression:
Stored size: 803 Bytes
Contents
require 'active-campaign-simple/version' module ActiveCampaign module Config # The list of available options VALID_OPTION_KEYS = [ :api_url, :api_key, :api_logger, :user_agent # allows you to change the User-Agent of the request headers ].freeze # @private attr_accessor *VALID_OPTION_KEYS # Convenience method to allow configuration options to be set in a block def configure yield self end # Create a hash of options and their values def options options = {} VALID_OPTION_KEYS.each{|k| options[k] = send(k)} options end def user_agent @user_agent ||= "active-campaign-simple-#{VERSION} (RubyGem)" end def api_logger @api_logger || ActiveCampaign::Logger.new end end end
Version data entries
11 entries across 11 versions & 1 rubygems