In Files

Parent

Methods

ClientException

Attributes

devices[R]
host[R]
path[R]
port[R]
query[R]
reason[R]
scheme[R]
status[R]

Public Class Methods

new(msg, params={}) click to toggle source
# 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

Public Instance Methods

to_s() click to toggle source
# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.