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