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



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

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



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

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

#divider(text, color:) ⇒ Object



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

def divider(text, color:); end

#prefixObject



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

def prefix; end

#prefix_widthObject



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

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


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

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

#start(text, color:) ⇒ Object



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

def start(text, color:); end

#style_nameObject



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

def style_name; end