Module: PerformanceHelpers::Term
Overview
Terminal formatting helpers
Constant Summary collapse
- HL =
"─"- VL =
"│"- TL =
"┌"- TR =
"┐"- BL =
"└"- BR =
"┘"
Instance Method Summary collapse
Instance Method Details
#header(title, color: PerformanceHelpers::CYAN) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/tasks/performance_helpers.rb', line 31 def header(title, color: PerformanceHelpers::CYAN) width = 78 line = HL * width puts puts "#{color}#{TL}#{line}#{TR}#{CLEAR}" puts "#{color}#{VL}#{CLEAR} #{BOLD}#{color}#{title}#{CLEAR}#{' ' * (width - title.length - 4)}#{color}#{VL}#{CLEAR}" puts "#{color}#{BL}#{line}#{BR}#{CLEAR}" end |