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

#idObject (readonly)

Returns the value of attribute id


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

def id
  @id
end

#privacy_statusString (readonly)


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

delegate :privacy_status, to: :status

Instance Method Details

#private?Boolean


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

def private?
  privacy_status == 'private'
end

#public?Boolean


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

def public?
  privacy_status == 'public'
end

#unlisted?Boolean


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

def unlisted?
  privacy_status == 'unlisted'
end