Method: Internode::Client#initialize

Defined in:
lib/internode/client.rb

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



10
11
12
13
14
15
16
17
# File 'lib/internode/client.rb', line 10

def initialize(options = {})
  username = options[:username] || ENV["INTERNODE_USERNAME"]
  password = options[:password] || ENV["INTERNODE_PASSWORD"]
  @url = options.fetch(:url){ URL }
  @client = HTTPClient.new
  @client.set_auth(@url, username, password)
  @client.cookie_manager = nil
end