Class: Yt::Models::RightOwner
Overview
Encapsulates information about the various types of owners of an asset.
Instance Method Summary collapse
-
#everywhere? ⇒ Boolean
Whether the ownership applies to the whole world.
-
#excluded_territories ⇒ Array<String>?
Return the list of territories where the owner does not own the asset.
-
#included_territories ⇒ Array<String>?
Return the list of territories where the owner owns the asset.
-
#initialize(options = {}) ⇒ RightOwner
constructor
A new instance of RightOwner.
-
#owner ⇒ String
The name of the asset’s owner or rights administrator.
- #publisher ⇒ String?
-
#ratio ⇒ Float
The percentage of the asset that the owner controls or administers.
Methods included from Associations::HasReports
Methods included from Associations::HasViewerPercentages
Methods included from Associations::HasOne
Methods included from Associations::HasMany
Methods included from Associations::HasAuthentication
Constructor Details
#initialize(options = {}) ⇒ RightOwner
8 9 10 |
# File 'lib/yt/models/right_owner.rb', line 8 def initialize( = {}) @data = [: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_territories ⇒ Array<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_territories ⇒ Array<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 |
#owner ⇒ String
21 |
# File 'lib/yt/models/right_owner.rb', line 21 has_attribute :owner |
#publisher ⇒ String?
27 |
# File 'lib/yt/models/right_owner.rb', line 27 has_attribute :publisher |
#ratio ⇒ Float
18 |
# File 'lib/yt/models/right_owner.rb', line 18 has_attribute :ratio, type: Float |