abstract class Athena::Console::Helper

Overview

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

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

Included Modules

Direct Known Subclasses

Defined in:

helper/athena_question.cr
helper/helper.cr

Class Method Summary

Instance Method Summary

Instance methods inherited from module Athena::Console::Helper::Interface

helper_set : ACON::Helper::HelperSet | Nil helper_set, helper_set=(helper_set : ACON::Helper::HelperSet | Nil) helper_set=

Class Method Detail

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

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


[View source]
def self.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]

Instance Method Detail

def helper_set : ACON::Helper::HelperSet | Nil #
Description copied from module Athena::Console::Helper::Interface

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


[View source]
def helper_set=(helper_set : ACON::Helper::HelperSet | Nil) #
Description copied from module Athena::Console::Helper::Interface

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


[View source]