class JSONAPI::Document::Meta
The meta of a resource
Public Class Methods
new(meta_arr = [])
click to toggle source
@param meta_arr [Array<JSONAPI::Document::Meta::MetaMember] The
array of meta members to initialize the collection with
Calls superclass method
JSONAPI::NameValuePairCollection::new
# File lib/easy/jsonapi/document/meta.rb, line 14 def initialize(meta_arr = []) meta_arr = [meta_arr] unless meta_arr.is_a? Array super(meta_arr, item_type: JSONAPI::Document::Meta::MetaMember) end
Public Instance Methods
add(meta_member)
click to toggle source
Add a jsonapi member to the collection @param meta_member [JSONAPI::Document::Meta::MetaMember] The member to add
Calls superclass method
JSONAPI::NameValuePairCollection#add
# File lib/easy/jsonapi/document/meta.rb, line 21 def add(meta_member) super(meta_member, &:name) end