Module: Vedeu::EscapeSequences::Borders

Extended by:
Borders
Included in:
Borders, Esc
Defined in:
lib/vedeu/esc/borders.rb

Overview

Note:

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

Instance Method Details

#border_offString

Returns:

  • (String)


30
31
32
# File 'lib/vedeu/esc/borders.rb', line 30

def border_off
  "\e(B"
end

#border_onString

Returns:

  • (String)


35
36
37
# File 'lib/vedeu/esc/borders.rb', line 35

def border_on
  "\e(0"
end

#bottom_leftString

└ # u2514

Returns:

  • (String)


42
43
44
# File 'lib/vedeu/esc/borders.rb', line 42

def bottom_left
  %(\x6D)
end

#bottom_rightString

Produces ‘┘’ (u2518)

Returns:

  • (String)


49
50
51
# File 'lib/vedeu/esc/borders.rb', line 49

def bottom_right
  %(\x6A)
end

#horizontalString

Produces ‘─’ (u2500)

Returns:

  • (String)


56
57
58
# File 'lib/vedeu/esc/borders.rb', line 56

def horizontal
  %(\x71)
end

#horizontal_bottomString

Produces ‘┴’ (u2534)

Returns:

  • (String)


63
64
65
# File 'lib/vedeu/esc/borders.rb', line 63

def horizontal_bottom
  %(\x76)
end

#horizontal_topString

Produces ‘┬’ (u252C)

Returns:

  • (String)


70
71
72
# File 'lib/vedeu/esc/borders.rb', line 70

def horizontal_top
  %(\x77)
end

#top_leftString

Produces ‘┌’ (u250C)

Returns:

  • (String)


77
78
79
# File 'lib/vedeu/esc/borders.rb', line 77

def top_left
  %(\x6C)
end

#top_rightString

Produces ‘┐’ (u2510)

Returns:

  • (String)


84
85
86
# File 'lib/vedeu/esc/borders.rb', line 84

def top_right
  %(\x6B)
end

#verticalString

Produces ‘│’ (u2502)

Returns:

  • (String)


91
92
93
# File 'lib/vedeu/esc/borders.rb', line 91

def vertical
  %(\x78)
end

#vertical_leftString

Produces ‘├’ (u251C)

Returns:

  • (String)


98
99
100
# File 'lib/vedeu/esc/borders.rb', line 98

def vertical_left
  %(\x74)
end

#vertical_rightString

Produces ‘┤’ (u2524)

Returns:

  • (String)


105
106
107
# File 'lib/vedeu/esc/borders.rb', line 105

def vertical_right
  %(\x75)
end