Class: BruteCLI::ToolOutput::Base
- Inherits:
-
Object
- Object
- BruteCLI::ToolOutput::Base
- Includes:
- BruteCLI
- Defined in:
- lib/brute_cli/tool_output.rb
Direct Known Subclasses
Delegate, Fetch, FsSearch, Patch, Question, Read, Remove, Shell, TodoRead, TodoWrite, Undo, Write
Constant Summary collapse
Constants included from BruteCLI
ACCENT, ACCENT_BG, ACCENT_BG2, ACCENT_BOLD, COLOR, DEFAULT_THEME, DIM, ERROR_BG, ERROR_FG, MONIKER, BruteCLI::THEMES
Instance Method Summary collapse
-
#header ⇒ Object
Icon + colorized name + summary (file path, command, etc.).
-
#initialize(name:, args: {}, width: 80) ⇒ Base
constructor
A new instance of Base.
Methods included from BruteCLI
apply_theme!, config, error, warn
Constructor Details
#initialize(name:, args: {}, width: 80) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 |
# File 'lib/brute_cli/tool_output.rb', line 10 def initialize(name:, args: {}, width: 80) @name = name.to_s @args = args.is_a?(Hash) ? args : {} @width = width end |
Instance Method Details
#header ⇒ Object
Icon + colorized name + summary (file path, command, etc.)
17 18 19 |
# File 'lib/brute_cli/tool_output.rb', line 17 def header "#{icon} #{@name.colorize(ACCENT_BG)} #{summary}".rstrip end |