Sha256: 34d13d594e9a920cd61934b0abc7e1f1e1042457f536866b33699d6344a2c83a

Contents?: true

Size: 358 Bytes

Versions: 10

Compression:

Stored size: 358 Bytes

Contents

require "opentok/broadcast"

module OpenTok
  # A class for accessing an array of Broadcast objects.
  class BroadcastList < Array
    # The total number of broadcasts.
    attr_reader :total

    def initialize(interface, json)
      @total = json["count"]
      super json["items"].map { |item| ::OpenTok::Broadcast.new interface, item }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
opentok-4.9.0 lib/opentok/broadcast_list.rb
opentok-4.8.1 lib/opentok/broadcast_list.rb
opentok-4.8.0 lib/opentok/broadcast_list.rb
opentok-4.7.1 lib/opentok/broadcast_list.rb
opentok-4.7.0 lib/opentok/broadcast_list.rb
opentok-4.6.0 lib/opentok/broadcast_list.rb
opentok-4.5.1 lib/opentok/broadcast_list.rb
opentok-4.5.0 lib/opentok/broadcast_list.rb
opentok-4.4.0 lib/opentok/broadcast_list.rb
opentok-4.3.0 lib/opentok/broadcast_list.rb