class Kommando::Interaction::Session

Defined in:

kommando/interaction.cr

Constant Summary

CONFIRM = ["Y", "y", "Yes", "yes"] of ::String
DENY = ["N", "n", "No", "no"] of ::String

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(io : IO, colorize : Bool = true) #

[View source]

Class Method Detail

def self.define(io : IO, colorize : Bool = true, &) #

[View source]

Instance Method Detail

def ask(text : String, &block : String -> T | Nil) : T forall T #

[View source]
def ask(text : String, type : Int32.class | Float32.class) : Int32 | Float32 #

[View source]
def br #

[View source]
def choose(text : String, options : Array(Tuple(String, String | Nil))) : String #

[View source]
def choose(text : String, options : Array(String)) : String #

[View source]
def colorize? : Bool #

[View source]
def colorized_io(fg : Symbol | Nil = nil, bg : Symbol | Nil = nil, m : Colorize::Mode | Nil = nil, &) #

[View source]
def confirm(text : String, confirm : Array(String) = CONFIRM, deny : Array(String) = DENY) #

[View source]
def gets(*args, **options) #

[View source]
def gets(*args, **options, &) #

[View source]
def print_input_marker #

[View source]
def print_question(q : String) #

[View source]
def read_once(type : Int32.class | Float32.class) #

[View source]
def read_string_once #

[View source]
def read_until(&block : String -> T | Nil) : T forall T #

[View source]
def w(*strs : String | Int32 | Nil, fg : Symbol | Nil = nil, bg : Symbol | Nil = nil, m : Colorize::Mode | Nil = nil) #

[View source]