# File lib/aws/sns/subscription_collection.rb, line 35 def each next_token = nil begin opts = request_opts opts[:next_token] = next_token if next_token resp = client.send(list_request, opts) resp.subscriptions.each do |sub| subscription = Subscription.new(sub.subscription_arn, :endpoint => sub.endpoint, :protocol => sub.protocol.tr('-','_').to_sym, :owner_id => sub.owner, :topic_arn => sub.topic_arn, :config => config ) yield(subscription) end next_token = resp.next_token end until resp && next_token.nil? nil end