Method: Twilio::REST::Version::RecordStream#each
- Defined in:
- lib/twilio-ruby/framework/rest/version.rb
#each ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/twilio-ruby/framework/rest/version.rb', line 17 def each current_record = 0 current_page = 1 while @page @page.each do |record| yield record current_record += 1 return nil if @limit && @limit <= current_record end return nil if @page_limit && @page_limit <= current_page @page = @page.next_page current_page += 1 end end |