Sha256: ffd8a73ecf9e466803fa73becfa4d17fbeaba06f48ae5e6792951d1c2d1e4da7

Contents?: true

Size: 705 Bytes

Versions: 5

Compression:

Stored size: 705 Bytes

Contents

module BulutfonSDK
  module Util
    class ClientConfig
      DEFAULTS = {
          host: 'https://api.bulutfon.com',
          port: 80,
          use_ssl: true,
          ssl_verify_peer: false,
          ssl_ca_file: File.dirname(__FILE__) + '/../../../conf/cacert.pem',
          timeout: 30,
          proxy_addr: nil,
          proxy_port: nil,
          proxy_user: nil,
          proxy_pass: nil,
          retry_limit: 2
      }

      DEFAULTS.each_key do |attribute|
        attr_accessor attribute
      end

      def initialize(opts={})
        DEFAULTS.each do |attribute, value|
          send("#{attribute}=".to_sym, opts.fetch(attribute, value))
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bulutfon_sdk-1.3.0 lib/bulutfon_sdk/util/client_config.rb
bulutfon_sdk-1.2.1 lib/bulutfon_sdk/util/client_config.rb
bulutfon_sdk-1.2.0 lib/bulutfon_sdk/util/client_config.rb
bulutfon_sdk-1.1.3 lib/bulutfon_sdk/util/client_config.rb
bulutfon_sdk-1.1.0 lib/bulutfon_sdk/util/client_config.rb