Represents a Site: protocol scheme, host String and port Number.
Creates a new Site based on the given URI.
# File lib/httpclient/session.rb, line 35 def initialize(uri = nil) if uri @scheme = uri.scheme @host = uri.host @port = uri.port.to_i else @scheme = 'tcp' @host = '0.0.0.0' @port = 0 end end
Returns true is scheme, host and port are '=='
# File lib/httpclient/session.rb, line 53 def ==(rhs) (@scheme == rhs.scheme) and (@host == rhs.host) and (@port == rhs.port) end
Returns address String.
# File lib/httpclient/session.rb, line 48 def addr "#{@scheme}://#{@host}:#{@port.to_s}" end
Generated with the Darkfish Rdoc Generator 2.