Sha256: 3fd8f55715928f713a39627442f096ed1e91648ff8b91f023f7a17a73c3176f6

Contents?: true

Size: 428 Bytes

Versions: 2

Compression:

Stored size: 428 Bytes

Contents

class Scamp
  module Connection
    private
    
    def connect(api_key, channels_to_join)
      EventMachine.run do
        # Ideally populate_channel_list would block, but I can't see an easy way to do this, so a hacky callback it is.
        populate_channel_list do
          channels_to_join.map{|c| channel_id(c) }.each do |id|
            join_and_stream(id)
          end
        end
      end
    end
      
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scamp-0.0.3 lib/scamp/connection.rb
scamp-0.0.2 lib/scamp/connection.rb