Module: Gish::TerminalHelpers

Included in:
Comment, Issue
Defined in:
lib/gish/helpers/terminal_helpers.rb

Instance Method Summary collapse

Instance Method Details

#bold(message) ⇒ Object



8
9
10
# File 'lib/gish/helpers/terminal_helpers.rb', line 8

def bold(message)
  "\033[1m#{message}\033[0m"
end

#console_widthObject



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(message)
  "\033[4m#{message}\033[0m"
end