Class: Yt::Collections::Subscriptions

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/collections/subscriptions.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, of, #where

Methods included from Actions::List

#first!

Constructor Details

This class inherits a constructor from Yt::Collections::Base

Instance Method Details

#delete_all(params = {}, options = {}) ⇒ Object



16
17
18
19
# File 'lib/yt/collections/subscriptions.rb', line 16

def delete_all(params = {}, options = {})
  throttle
  do_delete_all params, options
end

#insert(options = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/yt/collections/subscriptions.rb', line 8

def insert(options = {})
  throttle
  do_insert
rescue Yt::Error => error
  ignorable_errors = error.reasons & ['subscriptionDuplicate']
  raise error unless options[:ignore_errors] && ignorable_errors.any?
end