Module: Xmi::Performance::Helpers::Term
Overview
Terminal formatting helpers
Constant Summary collapse
- HL =
"─"- VL =
"│"- TL =
"┌"- TR =
"┐"- BL =
"└"- BR =
"┘"
Instance Method Summary collapse
Instance Method Details
#header(title, color: Helpers::CYAN) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/xmi/performance/helpers.rb', line 36 def header(title, color: Helpers::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 |