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)


28
29
30
# File 'lib/vedeu/esc/borders.rb', line 28

def border_off
  "\e(B"
end

#border_onString

Returns:

  • (String)


33
34
35
# File 'lib/vedeu/esc/borders.rb', line 33

def border_on
  "\e(0"
end

#bottom_leftString

└ # u2514

Returns:

  • (String)


40
41
42
# File 'lib/vedeu/esc/borders.rb', line 40

def bottom_left
  %(\x6D)
end

#bottom_rightString

Produces ‘┘’ (u2518)

Returns:

  • (String)


47
48
49
# File 'lib/vedeu/esc/borders.rb', line 47

def bottom_right
  %(\x6A)
end

#horizontalString

Produces ‘─’ (u2500)

Returns:

  • (String)


54
55
56
# File 'lib/vedeu/esc/borders.rb', line 54

def horizontal
  %(\x71)
end

#horizontal_bottomString

Produces ‘┴’ (u2534)

Returns:

  • (String)


61
62
63
# File 'lib/vedeu/esc/borders.rb', line 61

def horizontal_bottom
  %(\x76)
end

#horizontal_topString

Produces ‘┬’ (u252C)

Returns:

  • (String)


68
69
70
# File 'lib/vedeu/esc/borders.rb', line 68

def horizontal_top
  %(\x77)
end

#top_leftString

Produces ‘┌’ (u250C)

Returns:

  • (String)


75
76
77
# File 'lib/vedeu/esc/borders.rb', line 75

def top_left
  %(\x6C)
end

#top_rightString

Produces ‘┐’ (u2510)

Returns:

  • (String)


82
83
84
# File 'lib/vedeu/esc/borders.rb', line 82

def top_right
  %(\x6B)
end

#verticalString

Produces ‘│’ (u2502)

Returns:

  • (String)


89
90
91
# File 'lib/vedeu/esc/borders.rb', line 89

def vertical
  %(\x78)
end

#vertical_leftString

Produces ‘├’ (u251C)

Returns:

  • (String)


96
97
98
# File 'lib/vedeu/esc/borders.rb', line 96

def vertical_left
  %(\x74)
end

#vertical_rightString

Produces ‘┤’ (u2524)

Returns:

  • (String)


103
104
105
# File 'lib/vedeu/esc/borders.rb', line 103

def vertical_right
  %(\x75)
end