Exception: Expect4r::Router::Error::PingError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/router/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rname, dest, exp_pct, act_pct, sent, recv, output) ⇒ PingError

Returns a new instance of PingError.



33
34
35
36
# File 'lib/router/error.rb', line 33

def initialize(rname, dest, exp_pct, act_pct, sent, recv, output)
  @rname, @dest, @exp_pct, @act_pct, @sent, @recv, @ping_output = \
          rname, dest, exp_pct, act_pct, sent, recv, output
end

Instance Attribute Details

#act_pctObject (readonly)

Returns the value of attribute act_pct.



32
33
34
# File 'lib/router/error.rb', line 32

def act_pct
  @act_pct
end

#destObject (readonly)

Returns the value of attribute dest.



32
33
34
# File 'lib/router/error.rb', line 32

def dest
  @dest
end

#exp_pctObject (readonly)

Returns the value of attribute exp_pct.



32
33
34
# File 'lib/router/error.rb', line 32

def exp_pct
  @exp_pct
end

#ping_outputObject (readonly)

Returns the value of attribute ping_output.



32
33
34
# File 'lib/router/error.rb', line 32

def ping_output
  @ping_output
end

#recvObject (readonly)

Returns the value of attribute recv.



32
33
34
# File 'lib/router/error.rb', line 32

def recv
  @recv
end

#rnameObject (readonly)

Returns the value of attribute rname.



32
33
34
# File 'lib/router/error.rb', line 32

def rname
  @rname
end

#sentObject (readonly)

Returns the value of attribute sent.



32
33
34
# File 'lib/router/error.rb', line 32

def sent
  @sent
end

Instance Method Details

#err_msgObject



37
38
39
# File 'lib/router/error.rb', line 37

def err_msg
  "#{@rname} [PingError] : failed to ping #{@dest}, expected/actual pct: #{@exp_pct}/#{@act_pct}"
end