Class: TeamcityRestClient::Open

Inherits:
Authentication show all
Defined in:
lib/teamcity-rest-client.rb

Instance Method Summary collapse

Methods inherited from Authentication

#get, #query_string_for

Constructor Details

#initialize(host, port, options = {}) ⇒ Open

Returns a new instance of Open.



137
138
139
140
# File 'lib/teamcity-rest-client.rb', line 137

def initialize host, port, options = {}
  super(options)
  @host, @port = host, port
end

Instance Method Details

#to_sObject



147
148
149
# File 'lib/teamcity-rest-client.rb', line 147

def to_s
  "No Authentication"
end

#url(path, params = {}) ⇒ Object



142
143
144
145
# File 'lib/teamcity-rest-client.rb', line 142

def url path, params = {}
  query_string = !params.empty? ? "?#{query_string_for(params)}" : ""
  "http://#{@host}:#{@port}#{path}#{query_string}"
end