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