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
35: def initialize(uri = nil)
36: if uri
37: @scheme = uri.scheme
38: @host = uri.host
39: @port = uri.port.to_i
40: else
41: @scheme = 'tcp'
42: @host = '0.0.0.0'
43: @port = 0
44: end
45: end
Returns true is scheme, host and port are ’==’
# File lib/httpclient/session.rb, line 53
53: def ==(rhs)
54: (@scheme == rhs.scheme) and (@host == rhs.host) and (@port == rhs.port)
55: end
Returns address String.
# File lib/httpclient/session.rb, line 48
48: def addr
49: "#{@scheme}://#{@host}:#{@port.to_s}"
50: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.