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( = {}) username = [:username] || ENV["INTERNODE_USERNAME"] password = [:password] || ENV["INTERNODE_PASSWORD"] @url = .fetch(:url){ URL } @client = HTTPClient.new @client.set_auth(@url, username, password) @client. = nil end |