Class: Yt::Collections::References

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/collections/references.rb

Overview

Provides methods to interact with a collection of Content ID references.

Resources with references are: content owners.

Instance Method Summary collapse

Methods inherited from Base

#includes, #initialize, of, #where

Constructor Details

This class inherits a constructor from Yt::Collections::Base

Instance Method Details

#insert(attributes = {}) ⇒ Object



10
11
12
13
14
15
# File 'lib/yt/collections/references.rb', line 10

def insert(attributes = {})
  underscore_keys! attributes
  body = attributes.slice(*body_params)
  params = {claim_id: attributes[:claim_id], on_behalf_of_content_owner: @auth.owner_name}
  do_insert(params: params, body: body)
end