module CLI::UI::Frame::FrameStyle::Interface
Public interface for FrameStyles Applied by extending FrameStyle
Public Instance Methods
close(text, color:, right_text: nil)
click to toggle source
Draws the “Close” line for this frame style
Attributes¶ ↑
-
text
- (required) the text/title to output in the frame
Options¶ ↑
-
:color
- (required) The color of the frame. -
:right_text
- Text to print at the right of the line. Defaults to nil
# File lib/cli/ui/frame/frame_style.rb, line 90 def close(text, color:, right_text: nil) raise NotImplementedError end
divider(text, color: nil)
click to toggle source
name()
click to toggle source
# File lib/cli/ui/frame/frame_style.rb, line 50 def name raise NotImplementedError end
open(text, color:)
click to toggle source
prefix()
click to toggle source
Returns the character(s) that should be printed at the beginning of lines inside this frame
# File lib/cli/ui/frame/frame_style.rb, line 56 def prefix raise NotImplementedError end
prefix_width()
click to toggle source
Returns the printing width of the prefix
# File lib/cli/ui/frame/frame_style.rb, line 61 def prefix_width CLI::UI::ANSI.printing_width(prefix) end
Private Instance Methods
print_at_x(x, str)
click to toggle source
# File lib/cli/ui/frame/frame_style.rb, line 110 def print_at_x(x, str) CLI::UI::ANSI.cursor_horizontal_absolute(1 + x) + str end