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 : Colorize::Mode = :none)#

View source

Methods#

#add_option(option : Colorize::Mode) : Nil#

Adds a text mode to self.

View source

#add_option(option : String) : Nil#

:inherit:

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=(foreground : String)#

:inherit:

View source

#href=(href : String | Nil)#

Sets the href that self should link to.

View source

#options=(options : Colorize::Mode)#

:inherit:

View source

#remove_option(option : Colorize::Mode) : Nil#

Removes a text mode to self.

View source

#remove_option(option : String) : Nil#

:inherit:

View source