Class: Yt::Models::RightOwner

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

Overview

Encapsulates information about the various types of owners of an asset.

Instance Method Summary collapse

Methods included from Associations::HasReports

#has_report

Methods included from Associations::HasViewerPercentages

#has_viewer_percentages

Methods included from Associations::HasOne

#has_one

Methods included from Associations::HasMany

#has_many

Methods included from Associations::HasAuthentication

#has_authentication

Constructor Details

#initialize(options = {}) ⇒ RightOwner



8
9
10
# File 'lib/yt/models/right_owner.rb', line 8

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

Instance Method Details

#everywhere?Boolean



48
49
50
# File 'lib/yt/models/right_owner.rb', line 48

def everywhere?
  excluded_territories == []
end

#excluded_territoriesArray<String>?

Return the list of territories where the owner does not own the asset. Each territory is an ISO 3166 two-letter country code.



43
44
45
# File 'lib/yt/models/right_owner.rb', line 43

def excluded_territories
  territories if type == 'exclude'
end

#included_territoriesArray<String>?

Return the list of territories where the owner owns the asset. Each territory is an ISO 3166 two-letter country code.



34
35
36
# File 'lib/yt/models/right_owner.rb', line 34

def included_territories
  territories if type == 'include'
end

#ownerString



21
# File 'lib/yt/models/right_owner.rb', line 21

has_attribute :owner

#publisherString?



27
# File 'lib/yt/models/right_owner.rb', line 27

has_attribute :publisher

#ratioFloat



18
# File 'lib/yt/models/right_owner.rb', line 18

has_attribute :ratio, type: Float