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
6 7 8 |
# File 'lib/yt/models/right_owner.rb', line 6 def initialize( = {}) @data = [: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_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
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
16 |
# File 'lib/yt/models/right_owner.rb', line 16 has_attribute :ratio, type: Float |