Class: JSONAPI::Home::V1::ResourceSerializer
- Inherits:
-
Object
- Object
- JSONAPI::Home::V1::ResourceSerializer
- Includes:
- Serializer
- Defined in:
- app/serializers/jsonapi/home/v1/resource_serializer.rb
Instance Method Summary collapse
Instance Method Details
#jsonapi ⇒ Object
22 23 24 25 26 |
# File 'app/serializers/jsonapi/home/v1/resource_serializer.rb', line 22 def jsonapi { version: object.jsonapi_version } end |
#meta ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'app/serializers/jsonapi/home/v1/resource_serializer.rb', line 28 def [ if object.documentation { documentation: { href: object.documentation } } end, ].compact.reduce(&:merge) end |
#type ⇒ Object
18 19 20 |
# File 'app/serializers/jsonapi/home/v1/resource_serializer.rb', line 18 def type "jsonapi-home-resources" end |