Skip to content

struct Athena::Console::Formatter::OutputStyle
inherits Struct #

Default implementation of ACON::Formatter::OutputStyleInterface.

Included modules

Athena::Console::Formatter::OutputStyleInterface

Constructors#

.new(foreground : Colorize::Color | String = :default, background : Colorize::Color | String = :default, options : ACON::Formatter::Mode = :none) #

View source

Methods#

#add_option(option : String) : Nil #

:inherit:

View source

#add_option(option : ACON::Formatter::Mode) : Nil #

Adds a text mode to self.

View source

#apply(text : String) : String #

Applies self to the provided text.

View source

#background=(background : Colorize::Color) #

Sets the background color of self.

View source

#background=(color : String) #

:inherit:

View source

#foreground=(foreground : Colorize::Color) #

Sets the foreground color of self.

View source

#foreground=(color : String) #

:inherit:

View source

#href=(href : String?) #

Sets the href that self should link to.

View source

#options=(options : ACON::Formatter::Mode) #

:inherit:

View source

#remove_option(option : String) : Nil #

:inherit:

View source

#remove_option(option : ACON::Formatter::Mode) : Nil #

Removes a text mode to self.

View source