Class: Miteru::StatusError
- Inherits:
-
HTTP::Error
- Object
- HTTP::Error
- Miteru::StatusError
- Defined in:
- lib/miteru/errors.rb
Instance Attribute Summary collapse
- #body ⇒ String? readonly
- #status_code ⇒ Integer readonly
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(msg, status_code, body) ⇒ StatusError
constructor
A new instance of StatusError.
Constructor Details
#initialize(msg, status_code, body) ⇒ StatusError
Returns a new instance of StatusError.
26 27 28 29 30 31 |
# File 'lib/miteru/errors.rb', line 26 def initialize(msg, status_code, body) super(msg) @status_code = status_code @body = body end |
Instance Attribute Details
#body ⇒ String? (readonly)
19 20 21 |
# File 'lib/miteru/errors.rb', line 19 def body @body end |
#status_code ⇒ Integer (readonly)
16 17 18 |
# File 'lib/miteru/errors.rb', line 16 def status_code @status_code end |
Instance Method Details
#detail ⇒ Object
33 34 35 |
# File 'lib/miteru/errors.rb', line 33 def detail {status_code:, body:} end |