Sha256: d7e0fd626feebd2a41ae0484434ee498e52d1d234f21c4555de14881cdf801f2
Contents?: true
Size: 757 Bytes
Versions: 5
Compression:
Stored size: 757 Bytes
Contents
module Exchanger class Config include Singleton attr_accessor :endpoint, :timeout, :username, :password, :debug, :insecure_ssl def initialize reset end # Reset the configuration options to the defaults. def reset @endpoint = nil @timeout = 5 @username = nil @password = nil @debug = false @insecure_ssl = false end # Configure Exchanger client from a hash. This is usually called after parsing a # yaml config file such as exchanger.yml. # # Example: # # <tt>Exchanger::Config.instance.from_hash({})</tt> def from_hash(settings) settings.each do |name, value| send("#{name}=", value) if respond_to?("#{name}=") end end end end
Version data entries
5 entries across 5 versions & 1 rubygems