Class: Yt::Models::Policy

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/models/policy.rb

Overview

Provides methods to interact with YouTube ContentID policies. A policy resource specifies rules that define a particular usage or match policy that a partner can associate with an asset or claim.

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Policy


11
12
13
# File 'lib/yt/models/policy.rb', line 11

def initialize(options = {})
  @data = options[:data]
end

Instance Method Details

#descriptionString


23
# File 'lib/yt/models/policy.rb', line 23

has_attribute :description

#idString


17
# File 'lib/yt/models/policy.rb', line 17

has_attribute :id

#nameString


20
# File 'lib/yt/models/policy.rb', line 20

has_attribute :name

#rulesArray<PolicyRule>


31
32
33
# File 'lib/yt/models/policy.rb', line 31

has_attribute :rules do |rules|
  rules.map{|rule| PolicyRule.new data: rule}
end

#updated_atString


26
# File 'lib/yt/models/policy.rb', line 26

has_attribute :updated_at, type: Time, from: :time_updated