LiveView
Inherits Reference / Object
Constants
CHANNELS = Hash(String, Channel).new
GC_INTERVAL = 30.seconds
VERSION = "0.1.0"
Constructors
new
SourceClass methods
handle(socket)
SourceInstance methods
__mount__(socket)
Source__unmount__(socket)
Sourceevery(duration : Time::Span, &block)
Sourcehandle_event(event_name : String, data : String, socket : HTTP::WebSocket)
Sourcelive_view(io, id : Nil | String = UUID.random.to_s)
Sourcelive_view_id
Sourcemount(socket : HTTP::WebSocket)
I thought about making these abstract but most of the time you only need 1-2 of them, making about half of their definitions worthless.
mounted?
Sourceto_s(io)
Sourceunmount(socket : HTTP::WebSocket)
Sourceupdate(socket : HTTP::WebSocket, buffer = IO::Memory.new)
Sourceupdate(socket : HTTP::WebSocket, buffer = IO::Memory.new, &)
SourceMacros
javascript_tag
Sourcerender(string)
Sourcetemplate(filename)
Source