Exception: NetHTTPUtils::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- NetHTTPUtils::Error
- Defined in:
- lib/nethttputils.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(body, code = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(body, code = nil) ⇒ Error
Returns a new instance of Error.
19 20 21 22 |
# File 'lib/nethttputils.rb', line 19 def initialize body, code = nil @code = code super "HTTP error ##{code} #{body}" end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'lib/nethttputils.rb', line 18 def code @code end |