Sha256: 0a7d6d8dd1658a9ab56caf27d1cc954420ce72e983b6f352addb5fab331efe1e
Contents?: true
Size: 430 Bytes
Versions: 26
Compression:
Stored size: 430 Bytes
Contents
module WebsocketRails class EventQueue attr_reader :queue def initialize @queue = [] end def enqueue(event) @queue << event end alias :<< :enqueue def last @queue.last end def size @queue.size end def flush(&block) unless block.nil? @queue.each do |item| block.call item end end @queue = [] end end end
Version data entries
26 entries across 26 versions & 3 rubygems