Class: Yt::Models::Status
- Inherits:
-
Object
- Object
- Yt::Models::Status
- Defined in:
- lib/yt/models/status.rb
Overview
Encapsulates information about the privacy status of a resource, for instance a channel.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Status
constructor
A new instance of Status.
-
#privacy_status ⇒ String
Valid values are: private, public, unlisted.
-
#private? ⇒ Boolean
Whether the resource is private.
-
#public? ⇒ Boolean
Whether the resource is public.
-
#unlisted? ⇒ Boolean
Whether the resource is unlisted.
Constructor Details
#initialize(options = {}) ⇒ Status
Returns a new instance of Status.
7 8 9 |
# File 'lib/yt/models/status.rb', line 7 def initialize( = {}) @data = [:data] end |
Instance Method Details
#privacy_status ⇒ String
Valid values are: private, public, unlisted
28 29 30 |
# File 'lib/yt/models/status.rb', line 28 def privacy_status @privacy_status ||= @data['privacyStatus'] end |
#private? ⇒ Boolean
Returns whether the resource is private.
17 18 19 |
# File 'lib/yt/models/status.rb', line 17 def private? privacy_status == 'private' end |
#public? ⇒ Boolean
Returns whether the resource is public.
12 13 14 |
# File 'lib/yt/models/status.rb', line 12 def public? privacy_status == 'public' end |
#unlisted? ⇒ Boolean
Returns whether the resource is unlisted.
22 23 24 |
# File 'lib/yt/models/status.rb', line 22 def unlisted? privacy_status == 'unlisted' end |