Module: Vedeu::EscapeSequences::Borders
Overview
Refer to UTF-8 U+2500 to U+257F for border characters. More details can be found at:
en.wikipedia.org/wiki/Box-drawing_character
Using the ‘uXXXX’ variant produces gaps in the border, whilst the ‘xXX’ renders ‘nicely’.
Provides border/box related escape sequences for semigraphic characters.
# 0 1 2 3 4 5 6 7 8 9 A B C D E F 6 ┘ ┐ ┌ └ ┼ 7 ─ ├ ┤ ┴ ┬ │
Instance Method Summary collapse
- #border_off ⇒ String
- #border_on ⇒ String
-
#bottom_left ⇒ String
└ # u2514.
-
#bottom_right ⇒ String
Produces ‘┘’ (u2518).
-
#horizontal ⇒ String
Produces ‘─’ (u2500).
-
#horizontal_bottom ⇒ String
Produces ‘┴’ (u2534).
-
#horizontal_top ⇒ String
Produces ‘┬’ (u252C).
-
#top_left ⇒ String
Produces ‘┌’ (u250C).
-
#top_right ⇒ String
Produces ‘┐’ (u2510).
-
#vertical ⇒ String
Produces ‘│’ (u2502).
-
#vertical_left ⇒ String
Produces ‘├’ (u251C).
-
#vertical_right ⇒ String
Produces ‘┤’ (u2524).
Instance Method Details
#border_off ⇒ String
30 31 32 |
# File 'lib/vedeu/esc/borders.rb', line 30 def border_off "\e(B" end |
#border_on ⇒ String
35 36 37 |
# File 'lib/vedeu/esc/borders.rb', line 35 def border_on "\e(0" end |
#bottom_left ⇒ String
└ # u2514
42 43 44 |
# File 'lib/vedeu/esc/borders.rb', line 42 def bottom_left %(\x6D) end |
#bottom_right ⇒ String
Produces ‘┘’ (u2518)
49 50 51 |
# File 'lib/vedeu/esc/borders.rb', line 49 def bottom_right %(\x6A) end |
#horizontal ⇒ String
Produces ‘─’ (u2500)
56 57 58 |
# File 'lib/vedeu/esc/borders.rb', line 56 def horizontal %(\x71) end |
#horizontal_bottom ⇒ String
Produces ‘┴’ (u2534)
63 64 65 |
# File 'lib/vedeu/esc/borders.rb', line 63 def horizontal_bottom %(\x76) end |
#horizontal_top ⇒ String
Produces ‘┬’ (u252C)
70 71 72 |
# File 'lib/vedeu/esc/borders.rb', line 70 def horizontal_top %(\x77) end |
#top_left ⇒ String
Produces ‘┌’ (u250C)
77 78 79 |
# File 'lib/vedeu/esc/borders.rb', line 77 def top_left %(\x6C) end |
#top_right ⇒ String
Produces ‘┐’ (u2510)
84 85 86 |
# File 'lib/vedeu/esc/borders.rb', line 84 def top_right %(\x6B) end |
#vertical ⇒ String
Produces ‘│’ (u2502)
91 92 93 |
# File 'lib/vedeu/esc/borders.rb', line 91 def vertical %(\x78) end |
#vertical_left ⇒ String
Produces ‘├’ (u251C)
98 99 100 |
# File 'lib/vedeu/esc/borders.rb', line 98 def vertical_left %(\x74) end |
#vertical_right ⇒ String
Produces ‘┤’ (u2524)
105 106 107 |
# File 'lib/vedeu/esc/borders.rb', line 105 def vertical_right %(\x75) end |