Sha256: 260f66f6d78235a954575f333cb0c20bcbf5e80b6a7c09fe1960af16c908f4c7
Contents?: true
Size: 442 Bytes
Versions: 16
Compression:
Stored size: 442 Bytes
Contents
# change SSE.new with rails SSE object when is released # https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/live.rb require 'json' module Streamer class SSE def initialize(io) @io = io end def write(object, options = {}) options.each do |k, v| @io.write "#{k}: #{v}\n" end @io.write "data: #{object}\n\n" end def close @io.close end end end
Version data entries
16 entries across 16 versions & 2 rubygems