Module: Gish::TerminalHelpers
Instance Method Summary collapse
- #bold(message) ⇒ Object
- #console_width ⇒ Object
- #format_label(label) ⇒ Object
- #underline(message) ⇒ Object
Instance Method Details
#bold(message) ⇒ Object
8 9 10 |
# File 'lib/gish/helpers/terminal_helpers.rb', line 8 def bold() "\033[1m#{}\033[0m" end |
#console_width ⇒ Object
3 4 5 6 |
# File 'lib/gish/helpers/terminal_helpers.rb', line 3 def console_width size = %x{stty size} size.split(' ').last end |
#format_label(label) ⇒ Object
16 17 18 |
# File 'lib/gish/helpers/terminal_helpers.rb', line 16 def format_label(label) "\033[30m\033[47m #{label} \033[0m" end |
#underline(message) ⇒ Object
12 13 14 |
# File 'lib/gish/helpers/terminal_helpers.rb', line 12 def underline() "\033[4m#{}\033[0m" end |