Method: TTY::Box::Border#initialize

Defined in:
lib/tty/box/border.rb

#initialize(type: :light, top: :line, top_left: :corner_top_left, top_right: :corner_top_right, left: :pipe, right: :pipe, bottom: :line, bottom_left: :corner_bottom_left, bottom_right: :corner_bottom_right) ⇒ Border

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Border.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/tty/box/border.rb', line 47

def initialize(type: :light,
               top: :line,
               top_left: :corner_top_left,
               top_right: :corner_top_right,
               left: :pipe,
               right: :pipe,
               bottom: :line,
               bottom_left: :corner_bottom_left,
               bottom_right: :corner_bottom_right)

  @type         = type
  @top          = check_name(:top, top)
  @top_left     = check_name(:top_left, top_left)
  @top_right    = check_name(:top_right, top_right)
  @left         = check_name(:left, left)
  @right        = check_name(:right, right)
  @bottom       = check_name(:bottom, bottom)
  @bottom_left  = check_name(:bottom_left, bottom_left)
  @bottom_right = check_name(:bottom_right, bottom_right)
end