class JSONAPI::Document::Links
The links of a resource
Public Class Methods
new(link_arr = [])
click to toggle source
@param link_arr [Array<JSONAPI::Document::Links::Link] The array
of links to initialize this collection with.
Calls superclass method
JSONAPI::NameValuePairCollection::new
# File lib/easy/jsonapi/document/links.rb, line 15 def initialize(link_arr = []) super(link_arr, item_type: JSONAPI::Document::Links::Link) end
Public Instance Methods
add(link)
click to toggle source
Add a jsonapi member to the collection @param link [JSONAPI::Document::Links:Link] The member to add
Calls superclass method
JSONAPI::NameValuePairCollection#add
# File lib/easy/jsonapi/document/links.rb, line 21 def add(link) super(link, &:name) end