Exception: RHC::Rest::Exception

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, code = 1) ⇒ Exception

Returns a new instance of Exception.



26
27
28
29
# File 'lib/rhc/rest.rb', line 26

def initialize(message=nil, code=1)
  super(message)
  @code = (Integer(code) rescue nil)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



25
26
27
# File 'lib/rhc/rest.rb', line 25

def code
  @code
end