Class: Apiwork::Adapter::Wrapper::Member::Default
- Defined in:
- lib/apiwork/adapter/wrapper/member/default.rb
Overview
Default member response wrapper.
Wraps a serialized record under a singular 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::Member::Base
Instance Method Details
#wrap ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/apiwork/adapter/wrapper/member/default.rb', line 29 def wrap { root_key.singular.to_sym => data, meta: .presence, **, }.compact end |