Exception: JSONAPI::Exceptions::ParameterMissing
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#param ⇒ Object
Returns the value of attribute param.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(param) ⇒ ParameterMissing
constructor
A new instance of ParameterMissing.
Constructor Details
#initialize(param) ⇒ ParameterMissing
Returns a new instance of ParameterMissing.
224 225 226 |
# File 'lib/jsonapi/exceptions.rb', line 224 def initialize(param) @param = param end |
Instance Attribute Details
#param ⇒ Object
Returns the value of attribute param.
223 224 225 |
# File 'lib/jsonapi/exceptions.rb', line 223 def param @param end |
Instance Method Details
#errors ⇒ Object
228 229 230 231 232 233 |
# File 'lib/jsonapi/exceptions.rb', line 228 def errors [JSONAPI::Error.new(code: JSONAPI::PARAM_MISSING, status: :bad_request, title: 'Missing Parameter', detail: "The required parameter, #{param}, is missing.")] end |