Skip to content

abstract class Athena::Console::Helper
inherits Reference #

Contains ACON::Helper::Interface implementations that can be used to help with various tasks. Such as asking questions, or customizing the output format.

This class also acts as a base type that implements common functionality between each helper.

Included modules

Athena::Console::Helper::Interface

Direct known subclasses

Athena::Console::Helper::Formatter Athena::Console::Helper::Question

Class methods#

.remove_decoration(formatter : ACON::Formatter::Interface, string : String) : String #

Returns a new string with all of its ANSI formatting removed.

View source

.width(string : String) : Int32 #

Returns the width of a string; where the width is how many character positions the string will use.

Todo

Support double width chars.

View source

Methods#

#helper_set #

Returns the ACON::Helper::HelperSet related to self, if any.

View source

#helper_set=(helper_set : ACON::Helper::HelperSet?) #

Sets the ACON::Helper::HelperSet related to self.

View source