Class: Apiwork::Adapter::Wrapper::Collection::Default
- Defined in:
- lib/apiwork/adapter/wrapper/collection/default.rb
Overview
Default collection response wrapper.
Wraps serialized records under a pluralized root key with optional meta and capability metadata.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Apiwork::Adapter::Wrapper::Collection::Base
Instance Method Details
#wrap ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/apiwork/adapter/wrapper/collection/default.rb', line 36 def wrap { root_key.plural.to_sym => data, meta: .presence, **, }.compact end |