Module: CLI::UI::Frame::FrameStyle

Extended by:
T::Helpers, T::Sig
Includes:
Kernel
Included in:
Box, Bracket
Defined in:
lib/cli/ui/frame/frame_style.rb,
lib/cli/ui/frame/frame_style/box.rb,
lib/cli/ui/frame/frame_style/bracket.rb

Defined Under Namespace

Modules: Box, Bracket Classes: InvalidFrameStyleName

Constant Summary collapse

MAP =
{
  box: -> { FrameStyle::Box },
  bracket: -> { FrameStyle::Bracket },
}

Class Method Summary collapse

Instance Method Summary collapse

Methods included from T::Sig

sig

Methods included from T::Helpers

abstract!, final!, interface!, mixes_in_class_methods, sealed!

Class Method Details

.lookup(name) ⇒ Object



31
32
33
34
35
# File 'lib/cli/ui/frame/frame_style.rb', line 31

def lookup(name)
  MAP.fetch(name.to_sym).call
rescue KeyError
  raise(InvalidFrameStyleName, name)
end

Instance Method Details

#close(text, color:, right_text: nil) ⇒ Object



77
# File 'lib/cli/ui/frame/frame_style.rb', line 77

def close(text, color:, right_text: nil); end

#divider(text, color:) ⇒ Object



90
# File 'lib/cli/ui/frame/frame_style.rb', line 90

def divider(text, color:); end

#prefixObject



44
# File 'lib/cli/ui/frame/frame_style.rb', line 44

def prefix; end

#prefix_widthObject



48
49
50
# File 'lib/cli/ui/frame/frame_style.rb', line 48

def prefix_width
  CLI::UI::ANSI.printing_width(prefix)
end


93
94
95
# File 'lib/cli/ui/frame/frame_style.rb', line 93

def print_at_x(x, str)
  CLI::UI::ANSI.cursor_horizontal_absolute(1 + x) + str
end

#start(text, color:) ⇒ Object



63
# File 'lib/cli/ui/frame/frame_style.rb', line 63

def start(text, color:); end

#style_nameObject



39
# File 'lib/cli/ui/frame/frame_style.rb', line 39

def style_name; end