Exception: ShEx::Error
- Inherits:
-
StandardError
- Object
- StandardError
- ShEx::Error
- Defined in:
- lib/shex.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
The status code associated with this error.
Instance Method Summary collapse
-
#initialize(message, options = {}) ⇒ Error
constructor
Initializes a new patch error instance.
Constructor Details
#initialize(message, options = {}) ⇒ Error
Initializes a new patch error instance.
118 119 120 121 |
# File 'lib/shex.rb', line 118 def initialize(, = {}) @code = .fetch(:status_code, 422) super(.to_s) end |
Instance Attribute Details
#code ⇒ Object (readonly)
The status code associated with this error
110 111 112 |
# File 'lib/shex.rb', line 110 def code @code end |