Class: Yt::Collections::PlaylistItems
- Defined in:
- lib/yt/collections/playlist_items.rb
Instance Method Summary collapse
Methods inherited from Base
#includes, #initialize, of, #where
Constructor Details
This class inherits a constructor from Yt::Collections::Base
Instance Method Details
#insert(attributes = {}, options = {}) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/yt/collections/playlist_items.rb', line 7 def insert(attributes = {}, = {}) super attributes.merge(playlist_id: @parent.id), rescue Yt::Error => error ignorable_errors = error.reasons & ['videoNotFound', 'forbidden'] raise error unless [:ignore_errors] && ignorable_errors.any? end |