Module: Yt::Associations::Playlists
- Defined in:
- lib/yt/associations/playlists.rb
Overview
Provides the ‘has_many :playlists` method to YouTube resources, which allows to invoke playlist-related methods, such as .create_playlist. YouTube resources with playlist are: channels.
Instance Method Summary collapse
Instance Method Details
#create_playlist(params = {}) ⇒ Object
13 14 15 |
# File 'lib/yt/associations/playlists.rb', line 13 def create_playlist(params = {}) playlists.insert params end |
#delete_playlists(attrs = {}) ⇒ Object
17 18 19 |
# File 'lib/yt/associations/playlists.rb', line 17 def delete_playlists(attrs = {}) playlists.delete_all attrs end |
#playlists ⇒ Object
9 10 11 |
# File 'lib/yt/associations/playlists.rb', line 9 def playlists @playlists ||= Collections::Playlists.of self end |