module DataMetaXtra::AnsiCtl
ANSI control sequences.
Constants
- ATRB_DIV
ANSI atribute divider. When the ANSI seqs are disabled, this takes care of concatenating those.
- BACKS
All Backgrounds with names
- BLINK
Blinking
- BOLD
Styles: Bold
- B_BLACK
Black background
- B_BLUE
Blue background
- B_BROWN
Brown background
- B_CYAN
Cyan background
- B_DEFAULT
Default background
- B_DGRAY
Dark Gray, alias for GRAY background
- B_DGREY
Dark Grey background
- B_GREEN
Green background
- B_LBLUE
Light Blue background
- B_LBROWN
Light Brown background
- B_LCYAN
Light Cyan background
- B_LGRAY
Light Gray, alias for GRAY background
- B_LGREEN
Light Green background
- B_LGREY
Light Grey background
- B_LMAGENTA
Light Magenta, alias for PURPLE background
- B_LPURPLE
Light Purple background
- B_LRED
Light Red background
- B_LYELLOW
Light Yellow, alias for BROWN background
- B_MAGENTA
Magenta, alias for PURPLE background
- B_PLAIN
Plain background
- B_PURPLE
Purple background
- B_RED
Red background
- B_WHITE
Light White background
- B_YELLOW
Yellow, alias for BROWN background
- CL
Close the ANSI Escape Sequence
- DIM
Dimmed
- FORES
All Foregrounds with names
- F_BLACK
Black foreground
- F_BLUE
blue foreground
- F_BROWN
Brown foreground
- F_CYAN
Cyan foreground
- F_DEF
Foregrounds: Default foreground
- F_DGRAY
Dark Gray, alias for GRAY foreground
- F_DGREY
Dark Grey foreground
- F_GREEN
Green foreground
- F_LBLUE
Light Blue foreground
- F_LBROWN
Light Brown foreground
- F_LCYAN
Light Cyan foreground
- F_LGRAY
Light Gray, alias for GREY foreground
- F_LGREEN
Light Green foreground
- F_LGREY
Light Grey foreground
- F_LMAGENTA
Light Magenta, alias for PURPLE foreground
- F_LPURPLE
Light Purple foreground
- F_LRED
Light Red foreground
- F_LYELLOW
Light Yellow, alias for BROWN foreground
- F_MAGENTA
Magenta, alias or PURPLE foreground
- F_PURPLE
Purple foreground
- F_RED
Red foreground
- F_WHITE
Light White foreground
- F_YELLOW
Yellow, alias for BROWN foreground
- HIDDEN
Hidden text - to enter passwords
- OP
ANSI escape operation start
- PLAIN
Plain text
- REBLINK
Reset Blink
- REBOLD
Reset Bold
- REDIM
Reset Dim
- REHIDDEN
Reset hidden text
- REREVERSE
Reset reverse graphics
- RESET
Reset sequence
- REULINE
Reset Underline
- REVERSE
Reverse graphics
- SKIP_ANSI_ESC
Skip ANSI Escape sequences unless this env var is defined and set to 'yes'
- STYLES
All Styles with names
- ULINE
Underline
Public Class Methods
convenient test for all styles
# File lib/dataMetaXtra/ansi.rb, line 211 def test puts out = '' BACKS.keys.each { |b| FORES.keys.each { |f| STYLES.keys.each { |s| out << %<#{LLQBIG}#{OP}#{s};#{f};#{b}m#{FORES[f]}/#{BACKS[b]}:#{STYLES[s]}#{RESET}#{RRQBIG}> if out.length > 240 puts out out = '' end } } print "\n" } puts end
Private Instance Methods
convenient test for all styles
# File lib/dataMetaXtra/ansi.rb, line 211 def test puts out = '' BACKS.keys.each { |b| FORES.keys.each { |f| STYLES.keys.each { |s| out << %<#{LLQBIG}#{OP}#{s};#{f};#{b}m#{FORES[f]}/#{BACKS[b]}:#{STYLES[s]}#{RESET}#{RRQBIG}> if out.length > 240 puts out out = '' end } } print "\n" } puts end