JSONAPI::Document::Role::Attributes - Consumable role to build resource attributes
version 2.4
This role allows you to customize the fetching of a rows attributes.
Simply add this to the row object and implement the attributes method and it'll be called instead of JSONAPI::Document doing the building of attributes.
attributes
JSONAPI::Document
The method is passed a single argument, an ArrayRef of requested fields, which should be honoured in the returned HashRef.
ArrayRef
HashRef
Returns a hashref of columns/attributes for the consuming classes row.
To install JSONAPI::Document, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSONAPI::Document
CPAN shell
perl -MCPAN -e shell install JSONAPI::Document
For more information on module installation, please visit the detailed CPAN module installation guide.