class
Opal::TEA::Cmd
- Opal::TEA::Cmd
- Reference
- Object
Overview
Represents an asynchronous side-effect or command in The Elm Architecture.
Defined in:
opal/tea/cmd.crConstructors
-
.batch(cmds : Array(Cmd)) : Cmd
Combines multiple commands into a single batched command
- .batch(*cmds : Cmd) : Cmd
- .new(actions : Array( -> Msg | Nil) = [] of (-> Msg | ::Nil), quit : Bool = false)
-
.none : Cmd
Empty command doing nothing
-
.perform(&block : -> Msg | Nil) : Cmd
Creates a command from a single background action returning a message
-
.quit : Cmd
Command that requests exiting the application loop
-
.tick(interval : Time::Span, &block : Time -> Msg) : Cmd
Produces a command that waits interval and then emits the message returned by block
Instance Method Summary
Constructor Detail
Combines multiple commands into a single batched command
Creates a command from a single background action returning a message
Produces a command that waits interval and then emits the message returned by block