Class: Yt::Models::Resource
- Inherits:
-
Base
- Object
- Base
- Yt::Models::Resource
- Defined in:
- lib/yt/models/resource.rb
Direct Known Subclasses
Channel, Comment, CommentThread, Playlist, PlaylistItem, Video
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#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 ⇒ Object (readonly)
Returns the value of attribute id.
15 16 17 |
# File 'lib/yt/models/resource.rb', line 15 def id @id end |
#privacy_status ⇒ String (readonly)
Returns the privacy status of the resource. Possible values are: ‘private’, ‘public’, ‘unlisted’.
24 |
# File 'lib/yt/models/resource.rb', line 24 delegate :privacy_status, to: :status |
Instance Method Details
#private? ⇒ Boolean
Returns whether the resource is private.
32 33 34 |
# File 'lib/yt/models/resource.rb', line 32 def private? privacy_status == 'private' end |
#public? ⇒ Boolean
Returns whether the resource is public.
27 28 29 |
# File 'lib/yt/models/resource.rb', line 27 def public? privacy_status == 'public' end |
#unlisted? ⇒ Boolean
Returns whether the resource is unlisted.
37 38 39 |
# File 'lib/yt/models/resource.rb', line 37 def unlisted? privacy_status == 'unlisted' end |