Sha256: b8d58252d1c3390466f1059ab9d6564b459d4ebdf69a3bb0b48858d6ad7da74f
Contents?: true
Size: 313 Bytes
Versions: 15
Compression:
Stored size: 313 Bytes
Contents
module Spontaneous module Rack class SSE attr_reader :event, :data def initialize(params) @event = params[:event] @data = params[:data] end def to_sse lines = ["event: #{event}", "data: #{data}", "\n"] lines.join("\n") end end end end
Version data entries
15 entries across 15 versions & 1 rubygems