Sha256: 0c1ef6712123e45d6c9c719ec31736b210719a51ca75f4adaf5c8db4e937844a
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
module IEX module Api module Config extend self ATTRIBUTES = %i[ proxy user_agent ca_path ca_file logger timeout open_timeout endpoint publishable_token secret_token ].freeze attr_accessor(*Config::ATTRIBUTES) def reset! self.endpoint = 'https://cloud.iexapis.com/v1' self.publishable_token = ENV['IEX_API_PUBLISHABLE_TOKEN'] self.secret_token = ENV['IEX_API_SECRET_TOKEN'] self.user_agent = "IEX Ruby Client/#{IEX::VERSION}" self.ca_path = defined?(OpenSSL) ? OpenSSL::X509::DEFAULT_CERT_DIR : nil self.ca_file = defined?(OpenSSL) ? OpenSSL::X509::DEFAULT_CERT_FILE : nil self.proxy = nil self.logger = nil self.timeout = nil self.open_timeout = nil end end class << self def configure block_given? ? yield(Config) : Config end def config Config end end end end IEX::Api::Config.reset!
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
iex-ruby-client-1.2.0 | lib/iex/api/config.rb |
iex-ruby-client-1.1.2 | lib/iex/api/config.rb |
iex-ruby-client-1.1.1 | lib/iex/api/config.rb |