rest/version.rb

twilio-ruby · lib/twilio-ruby/framework/rest/version.rb · ruby · MIT
voice, Voice / Speech

Handles REST API requests and pagination for Twilio services.

# Source: https://github.com/twilio/twilio-ruby | License: MIT | Copyright 2023, Twilio, Inc. <https://www.twilio.com/help/contact>
# Provided via justclaw.it.com; keep this notice with the code.
# frozen_string_literal: true

module Twilio
  module REST
    class Version
      attr_accessor :domain, :version

      class RecordStream
        include Enumerable

        def initialize(page, limit: nil, page_limit: nil)
          @page = page
          @limit = limit
          @page_limit = page_limit
        end

        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

         

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key