Method: Collins::Client#initialize
- Defined in:
- lib/collins/client.rb
#initialize(options = {}) ⇒ Client
Create a collins client instance
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/collins/client.rb', line 44 def initialize = {} config = symbolize_hash @locations = {} @headers = {} @host = fix_hostname(config.fetch(:host, "")) @logger = get_logger config.merge(:progname => 'Collins_Client') @timeout_i = config.fetch(:timeout, 10).to_i @username = config.fetch(:username, "") @password = config.fetch(:password, "") @strict = config.fetch(:strict, false) @managed_process = config.fetch(:managed_process, nil) require_non_empty(@host, "Collins::Client host must be specified") require_non_empty(@username, "Collins::Client username must be specified") require_non_empty(@password, "Collins::Client password must be specified") end |