Method: FormAPI::Configuration#initialize
- Defined in:
- lib/form_api/configuration.rb
#initialize {|_self| ... } ⇒ Configuration
Returns a new instance of Configuration.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/form_api/configuration.rb', line 134 def initialize @scheme = 'https' @host = 'api.formapi.io' @base_path = '/api/v1' @api_key = {} @api_key_prefix = {} @timeout = 0 @client_side_validation = true @verify_ssl = true @verify_ssl_host = true @params_encoding = nil @cert_file = nil @key_file = nil @debugging = false @inject_format = false @force_ending_format = false @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) # Use ENV variables by default if they are provided. @username = ENV['FORMAPI_TOKEN_ID'] @password = ENV['FORMAPI_TOKEN_SECRET'] yield(self) if block_given? end |