class

ActionController::Live::SSE(T)

Inherits Reference < Object

Порт ActionController::Live::SSE: пишем SSE-события в любой объект с write(String)/close (стрим или фейка в спеках).

Constructors

new(stream : T, event : String | Nil = nil, id : Int32 | Nil = nil, retry : Int32 | Nil = nil)
Source

Instance methods

close
Source
write(object : String | JSON::Any::Type, event : String | Nil = nil, id : Int32 | Nil = nil, retry : Int32 | Nil = nil) : Nil

String — как есть; прочее — JSON (ActiveSupport::JSON.encode гема ↔ to_json — побайтово на простых значениях).

Source