Sha256: edbac570d580bc88bf3cb384697e0635bcae8e0c12edeaa969f30e35e6ff9965

Contents?: true

Size: 322 Bytes

Versions: 17

Compression:

Stored size: 322 Bytes

Contents

require "opentok/stream"


module OpenTok
  # A class for accessing a list of Stream objects.
  class StreamList < Array

    # The total number streams.
    attr_reader :total

    # @private
    def initialize(json)
      @total = json['count']
      super json['items'].map { |item| Stream.new item }
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
opentok-4.9.0 lib/opentok/stream_list.rb
opentok-4.8.1 lib/opentok/stream_list.rb
opentok-4.8.0 lib/opentok/stream_list.rb
opentok-4.7.1 lib/opentok/stream_list.rb
opentok-4.7.0 lib/opentok/stream_list.rb
opentok-4.6.0 lib/opentok/stream_list.rb
opentok-4.5.1 lib/opentok/stream_list.rb
opentok-4.5.0 lib/opentok/stream_list.rb
opentok-4.4.0 lib/opentok/stream_list.rb
opentok-4.3.0 lib/opentok/stream_list.rb
opentok-4.2.0 lib/opentok/stream_list.rb
opentok-4.1.2 lib/opentok/stream_list.rb
opentok-4.1.1 lib/opentok/stream_list.rb
opentok-4.1.0 lib/opentok/stream_list.rb
opentok-4.0.1 lib/opentok/stream_list.rb
opentok-4.0.0 lib/opentok/stream_list.rb
opentok-3.1.0 lib/opentok/stream_list.rb