Class: Yt::Models::Resource
- Inherits:
-
Base
- Object
- Base
- Yt::Models::Resource
- Defined in:
- lib/yt/models/resource.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
The ID that YouTube uses to identify each resource.
-
#privacy_status ⇒ String
readonly
The privacy status of the resource.
Instance Method Summary collapse
-
#private? ⇒ Boolean
Whether the resource is private.
-
#public? ⇒ Boolean
Whether the resource is public.
-
#unlisted? ⇒ Boolean
Whether the resource is unlisted.
Instance Attribute Details
#id ⇒ String (readonly)
Returns the ID that YouTube uses to identify each resource.
16 |
# File 'lib/yt/models/resource.rb', line 16 has_one :id |
#privacy_status ⇒ String (readonly)
Returns the privacy status of the resource. Possible values are: ‘private’, ‘public’, ‘unlisted’.
25 |
# File 'lib/yt/models/resource.rb', line 25 delegate :privacy_status, to: :status |
Instance Method Details
#private? ⇒ Boolean
Returns whether the resource is private.
33 34 35 |
# File 'lib/yt/models/resource.rb', line 33 def private? privacy_status == 'private' end |
#public? ⇒ Boolean
Returns whether the resource is public.
28 29 30 |
# File 'lib/yt/models/resource.rb', line 28 def public? privacy_status == 'public' end |
#unlisted? ⇒ Boolean
Returns whether the resource is unlisted.
38 39 40 |
# File 'lib/yt/models/resource.rb', line 38 def unlisted? privacy_status == 'unlisted' end |