Class: Yt::Models::Resource

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/models/resource.rb

Direct Known Subclasses

Channel, Comment, CommentThread, Playlist, PlaylistItem, Video

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idString (readonly)



16
# File 'lib/yt/models/resource.rb', line 16

has_one :id

#privacy_statusString (readonly)



25
# File 'lib/yt/models/resource.rb', line 25

delegate :privacy_status, to: :status

Instance Method Details

#private?Boolean



33
34
35
# File 'lib/yt/models/resource.rb', line 33

def private?
  privacy_status == 'private'
end

#public?Boolean



28
29
30
# File 'lib/yt/models/resource.rb', line 28

def public?
  privacy_status == 'public'
end

#unlisted?Boolean



38
39
40
# File 'lib/yt/models/resource.rb', line 38

def unlisted?
  privacy_status == 'unlisted'
end