Class: HatiJsonapiError::Source
- Inherits:
-
Object
- Object
- HatiJsonapiError::Source
- Defined in:
- lib/hati_jsonapi_error/api_error/source.rb
Overview
This class is used to build the source object for the error response.
Constant Summary collapse
- STR =
''
Instance Attribute Summary collapse
-
#header ⇒ Object
Returns the value of attribute header.
-
#parameter ⇒ Object
Returns the value of attribute parameter.
-
#pointer ⇒ Object
Returns the value of attribute pointer.
Instance Method Summary collapse
-
#initialize(pointer: STR, parameter: STR, header: STR) ⇒ Source
constructor
A new instance of Source.
- #to_h ⇒ Object
Constructor Details
Instance Attribute Details
#header ⇒ Object
Returns the value of attribute header.
8 9 10 |
# File 'lib/hati_jsonapi_error/api_error/source.rb', line 8 def header @header end |
#parameter ⇒ Object
Returns the value of attribute parameter.
8 9 10 |
# File 'lib/hati_jsonapi_error/api_error/source.rb', line 8 def parameter @parameter end |
#pointer ⇒ Object
Returns the value of attribute pointer.
8 9 10 |
# File 'lib/hati_jsonapi_error/api_error/source.rb', line 8 def pointer @pointer end |
Instance Method Details
#to_h ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/hati_jsonapi_error/api_error/source.rb', line 16 def to_h { pointer: pointer, parameter: parameter, header: header } end |