Class: Yt::Models::RightOwner
- Inherits:
-
Base
- Object
- Base
- Yt::Models::RightOwner
- Defined in:
- lib/yt/models/right_owner.rb
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.
Constructor Details
#initialize(options = {}) ⇒ RightOwner
Returns a new instance of RightOwner.
6 7 8 |
# File 'lib/yt/models/right_owner.rb', line 6 def initialize( = {}) @data = [:data] end |
Instance Method Details
#everywhere? ⇒ Boolean
Returns whether the ownership applies to the whole world.
46 47 48 |
# File 'lib/yt/models/right_owner.rb', line 46 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.
41 42 43 |
# File 'lib/yt/models/right_owner.rb', line 41 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.
32 33 34 |
# File 'lib/yt/models/right_owner.rb', line 32 def included_territories territories if type == 'include' end |
#owner ⇒ String
Returns the name of the asset’s owner or rights administrator.
19 |
# File 'lib/yt/models/right_owner.rb', line 19 has_attribute :owner |
#publisher ⇒ String?
25 |
# File 'lib/yt/models/right_owner.rb', line 25 has_attribute :publisher |
#ratio ⇒ Float
Returns the percentage of the asset that the owner controls or administers. For composition assets, the value can be any value between 0 and 100 inclusive. For all other assets, the only valid values are 100, which indicates that the owner completely owns the asset in the specified territories, and 0, which indicates that you are removing ownership of the asset in the specified territories.
16 |
# File 'lib/yt/models/right_owner.rb', line 16 has_attribute :ratio, type: Float |