class

Kommando::Interaction::Session

Inherits Reference < Object

Constants

CONFIRM = ["y", "yes"] of ::String
DENY = ["n", "no"] of ::String

Constructors

new(outp : IO, inp : IO, colorize : Bool = true)
Source

Class methods

define(outp : IO = STDOUT, inp : IO = STDIN, colorize : Bool = true, &)
Source

Instance methods

abort(s : String)
Source
ask(text : String, &block : String -> T | Nil) : T forall T
Source
ask(text : String, type : Int32.class | Float32.class) : Int32 | Float32
Source
cancel(s : String = "Cancelled")
Source
choose(text : String, options : Array(Tuple(String, String | Nil))) : String
Source
choose(text : String, options : Array(String)) : String
Source
colorize?
Source
colorized_io(fg : RGB | Nil = nil, bg : RGB | Nil = nil, m : Colorize::Mode | Nil = nil, &)
Source
confirm(text : String, confirm : Array(String) = CONFIRM, deny : Array(String) = DENY)
Source
read_once(type : Int32.class | Float32.class)
Source
read_string_once
Source
read_until
Source
w(*strs : String | Int32 | Nil, fg : RGB | Nil = nil, bg : RGB | Nil = nil, m : Colorize::Mode | Nil = nil)
Source
wl(*strs : String | Int32 | Nil, **options)
Source