Module: Matheus::StringFormat

Included in:
Command
Defined in:
lib/matheus/string_format.rb

Instance Method Summary collapse

Instance Method Details

#bold(text) ⇒ Object



13
14
15
# File 'lib/matheus/string_format.rb', line 13

def bold(text)
  "\e[1m#{text}\e[22m"
end

#error(message) ⇒ Object



5
6
7
# File 'lib/matheus/string_format.rb', line 5

def error(message)
  bold(red("Error: ") + message)
end

#red(text) ⇒ Object



9
10
11
# File 'lib/matheus/string_format.rb', line 9

def red(text)
  "\e[31m#{text}\e[0m"
end