class

LiveView::Base

Inherits Reference < Object

Class methods

registry
Source

Instance methods

__lv_close(reason : String) : Nil
Source
__lv_escape(value : String) : String
Source
__lv_escape(value : SafeString) : String
Source
__lv_escape(value : Nil) : String
Source
__lv_escape(value) : String
Source
__lv_out(value : String) : Nil
Source
__lv_start(session : Session) : Nil

Wires the session and starts the inbox fiber (called by Session#join).

Source
handle_event(event : String, params : JSON::Any) : Nil
Source
handle_info(message : Info) : Nil
Source
lv_each(collection, &)

Iterates a collection inside a template do-block. The block appends markup through __lv_out / __lv_escape; the result is the block's buffer as safe HTML (the Phoenix for comprehension).

Source
mount(params : Hash(String, JSON::Any), session : Hash(String, JSON::Any)) : Nil
Source
send_after(delay : Time::Span, message : Info) : Nil
Source
send_every(interval : Time::Span, message : Info) : Nil
Source
send_info(message : Info) : Nil
Source
terminate(reason : String) : Nil
Source

Macros

lv_template(path)

Compiles an ERB-syntax template into #render_lv. Path resolves from the compile-time working directory (like stdlib ECR).

Source