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


27
28
29
30
31
# File 'lib/cli/ui/frame/frame_style.rb', line 27

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

Instance Method Details

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


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

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

#divider(text, color:) ⇒ Object


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

def divider(text, color:); end

#prefixObject


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

def prefix; end

#prefix_widthObject


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

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

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

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

#start(text, color:) ⇒ Object


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

def start(text, color:); end

#style_nameObject


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

def style_name; end