class

LiveView

Inherits Reference / Object

Constants

CHANNELS = Hash(String, Channel).new
GC_INTERVAL = 30.seconds
VERSION = "0.1.0"

Constructors

Class methods

handle(socket)
Source

Instance methods

__mount__(socket)
Source
__unmount__(socket)
Source
every(duration : Time::Span, &block)
Source
handle_event(event_name : String, data : String, socket : HTTP::WebSocket)
Source
live_view(io, id : Nil | String = UUID.random.to_s)
Source
live_view_id
Source
mount(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.

Source
mounted?
Source
to_s(io)
Source
unmount(socket : HTTP::WebSocket)
Source
update(socket : HTTP::WebSocket, buffer = IO::Memory.new)
Source
update(socket : HTTP::WebSocket, buffer = IO::Memory.new, &)
Source

Macros

javascript_tag
Source
render(string)
Source
template(filename)
Source