module
Opal::TEA::Model
Overview
Core Model interface representing the state, update logic, and view in The Elm Architecture.
Defined in:
opal/tea/model.crInstance Method Summary
-
#init : Cmd
Returns initial commands to execute upon application startup.
-
#render(buffer : UI::Buffer) : Nil
Optional direct buffer rendering for flicker-free double buffering
-
#update(msg : Msg) : Tuple(Model, Cmd)
Updates the model state based on an incoming message, returning the new model and optional command.
-
#view : String
Renders the current state as a formatted terminal string.
Instance Method Detail
Returns initial commands to execute upon application startup.
def render(buffer : UI::Buffer) : Nil
#
Optional direct buffer rendering for flicker-free double buffering
Updates the model state based on an incoming message, returning the new model and optional command.