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
28 29 30 |
# File 'lib/vedeu/esc/borders.rb', line 28 def border_off "\e(B" end |
#border_on ⇒ String
33 34 35 |
# File 'lib/vedeu/esc/borders.rb', line 33 def border_on "\e(0" end |
#bottom_left ⇒ String
└ # u2514
40 41 42 |
# File 'lib/vedeu/esc/borders.rb', line 40 def bottom_left %(\x6D) end |
#bottom_right ⇒ String
Produces ‘┘’ (u2518)
47 48 49 |
# File 'lib/vedeu/esc/borders.rb', line 47 def bottom_right %(\x6A) end |
#horizontal ⇒ String
Produces ‘─’ (u2500)
54 55 56 |
# File 'lib/vedeu/esc/borders.rb', line 54 def horizontal %(\x71) end |
#horizontal_bottom ⇒ String
Produces ‘┴’ (u2534)
61 62 63 |
# File 'lib/vedeu/esc/borders.rb', line 61 def horizontal_bottom %(\x76) end |
#horizontal_top ⇒ String
Produces ‘┬’ (u252C)
68 69 70 |
# File 'lib/vedeu/esc/borders.rb', line 68 def horizontal_top %(\x77) end |
#top_left ⇒ String
Produces ‘┌’ (u250C)
75 76 77 |
# File 'lib/vedeu/esc/borders.rb', line 75 def top_left %(\x6C) end |
#top_right ⇒ String
Produces ‘┐’ (u2510)
82 83 84 |
# File 'lib/vedeu/esc/borders.rb', line 82 def top_right %(\x6B) end |
#vertical ⇒ String
Produces ‘│’ (u2502)
89 90 91 |
# File 'lib/vedeu/esc/borders.rb', line 89 def vertical %(\x78) end |
#vertical_left ⇒ String
Produces ‘├’ (u251C)
96 97 98 |
# File 'lib/vedeu/esc/borders.rb', line 96 def vertical_left %(\x74) end |
#vertical_right ⇒ String
Produces ‘┤’ (u2524)
103 104 105 |
# File 'lib/vedeu/esc/borders.rb', line 103 def vertical_right %(\x75) end |