Class: Yt::Collections::Subscriptions
- Defined in:
- lib/yt/collections/subscriptions.rb
Instance Method Summary collapse
Methods inherited from Base
#includes, #initialize, of, #where
Methods included from Actions::List
Constructor Details
This class inherits a constructor from Yt::Collections::Base
Instance Method Details
#insert(options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/yt/collections/subscriptions.rb', line 8 def insert( = {}) do_insert rescue Yt::Error => error ignorable_error = error.reasons.include? 'subscriptionDuplicate' ignorable_error ||= (@parent.id == @auth.channel.id) if @auth raise error unless [:ignore_errors] && ignorable_error end |