class

Opal::TEA::Cmd

Inherits Reference < Object

Represents an asynchronous side-effect or command in The Elm Architecture.

Constructors

batch(cmds : Array(Cmd)) : Cmd

Combines multiple commands into a single batched command

Source
batch(*cmds : Cmd) : Cmd
Source
new(actions : Array( -> Msg | Nil) = [] of (-> Msg | ::Nil), quit : Bool = false, redraw : Bool = false)
Source
none

Empty command doing nothing

Source
perform

Creates a command from a single background action returning a message

Source
quit

Command that requests exiting the application loop

Source
redraw

Command that requests a full screen redraw and buffer invalidation

Source
tick(interval : Time::Span, &block : Time -> Msg) : Cmd

Produces a command that waits interval and then emits the message returned by block

Source

Instance methods

actions
Source
quit?
Source
redraw?
Source