class HTTPClient::Site
Represents a Site: protocol scheme, host String
and port Number.
Constants
- EMPTY
Attributes
Host String
.
Port number.
Protocol scheme.
Public Class Methods
Source
Public Instance Methods
Source
# File lib/httpclient/session.rb, line 63 def ==(rhs) (@scheme == rhs.scheme) and (@host == rhs.host) and (@port == rhs.port) end
Returns true is scheme, host and port are ‘==’
Source
# File lib/httpclient/session.rb, line 58 def addr "#{@scheme}://#{@host}:#{@port.to_s}" end
Returns address String
.
Source
# File lib/httpclient/session.rb, line 68 def eql?(rhs) self == rhs end
Same as ==.
Source
# File lib/httpclient/session.rb, line 81 def match(uri) (@scheme == uri.scheme) and (@host == uri.host) and (@port == uri.port.to_i) end
Returns true if scheme, host and port of the given URI
matches with this.