Module: SonarQube::Client

Defined in:
lib/sonarqube-client/client.rb

Instance Method Summary collapse

Instance Method Details

#connect(server_url, username = '', password = '') ⇒ Object



20
21
22
# File 'lib/sonarqube-client/client.rb', line 20

def connect(server_url, username='', password='')
  RestClient::Resource.new(server_url, username, password)
end

#initialize(server_url, username = '', password = '') ⇒ Object



24
25
26
27
28
29
30
# File 'lib/sonarqube-client/client.rb', line 24

def initialize(server_url, username='', password='')
  if username + password == ''
    proc {|endpoint| RestClient::Resource.new server_url+endpoint}.curry
  else
    proc {|endpoint| RestClient::Resource.new server_url+endpoint, a, b}.curry
  end
end