Exception: JSONAPI::Exceptions::KeyNotIncludedInURL
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(key) ⇒ KeyNotIncludedInURL
constructor
A new instance of KeyNotIncludedInURL.
Constructor Details
#initialize(key) ⇒ KeyNotIncludedInURL
Returns a new instance of KeyNotIncludedInURL.
190 191 192 |
# File 'lib/jsonapi/exceptions.rb', line 190 def initialize(key) @key = key end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
189 190 191 |
# File 'lib/jsonapi/exceptions.rb', line 189 def key @key end |
Instance Method Details
#errors ⇒ Object
194 195 196 197 198 199 |
# File 'lib/jsonapi/exceptions.rb', line 194 def errors [JSONAPI::Error.new(code: JSONAPI::KEY_NOT_INCLUDED_IN_URL, status: :bad_request, title: 'Key is not included in URL', detail: "The URL does not support the key #{key}")] end |