Class: OpenVASOMP::OMPError

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

Direct Known Subclasses

OMPAuthError, OMPResponseError, XMLParsingError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(req, reason = '') ⇒ OMPError

Returns a new instance of OMPError.



19
20
21
22
# File 'lib/ovas.rb', line 19

def initialize(req, reason = '')
	self.req = req
	self.reason = reason
end

Instance Attribute Details

#reasonObject

Returns the value of attribute reason.



18
19
20
# File 'lib/ovas.rb', line 18

def reason
  @reason
end

#reqObject

Returns the value of attribute req.



18
19
20
# File 'lib/ovas.rb', line 18

def req
  @req
end

Instance Method Details

#to_sObject



23
24
25
# File 'lib/ovas.rb', line 23

def to_s
	"OpenVAS OMP: #{self.reason}"
end