# File lib/client.rb, line 7 def initialize(msg, params={}) @msg = msg @scheme = params[:http_scheme] @host = params[:http_host] @port = params[:http_port] @path = params[:http_path] @query = params[:http_query] @status = params[:http_status] @reason = params[:http_reason] @device = params[:http_device] end
# File lib/client.rb, line 19 def to_s a = @msg b = '' b += "#{@scheme}://" if @scheme b += @host if @host b += ":#{@port}" if @port b += @path if @path b += "?#{@query}" if @query b ? b = "#{b} #{@status}" : b = @status.to_s if @status b ? b = "#{b} #{@reason}" : b = "- #{@reason}" if @reason b ? b = "#{b}: device #{@device}" : b = "device #{@device}" if @device b ? "#{a} #{b}" : a end
Generated with the Darkfish Rdoc Generator 2.