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

Constructor Details

#initialize(options = {}) ⇒ RightOwner


6
7
8
# File 'lib/yt/models/right_owner.rb', line 6

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

Instance Method Details

#everywhere?Boolean


46
47
48
# File 'lib/yt/models/right_owner.rb', line 46

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.


41
42
43
# File 'lib/yt/models/right_owner.rb', line 41

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.


32
33
34
# File 'lib/yt/models/right_owner.rb', line 32

def included_territories
  territories if type == 'include'
end

#ownerString


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

has_attribute :owner

#publisherString?


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

has_attribute :publisher

#ratioFloat


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

has_attribute :ratio, type: Float