Module: Gramrb::Formatter

Included in:
CLI
Defined in:
lib/gramrb/formatter.rb

Instance Method Summary collapse

Instance Method Details

#cyan(str) ⇒ Object



11
# File 'lib/gramrb/formatter.rb', line 11

def cyan(str) = "\e[36m#{str}\e[0m"

#green(str) ⇒ Object



7
# File 'lib/gramrb/formatter.rb', line 7

def green(str) = "\e[32m#{str}\e[0m"

#pluralise(count, word) ⇒ Object



3
# File 'lib/gramrb/formatter.rb', line 3

def pluralise(count, word) = "#{count} #{count == 1 ? word : "#{word}s"}"

#red(str) ⇒ Object



5
# File 'lib/gramrb/formatter.rb', line 5

def red(str) = "\e[31m#{str}\e[0m"

#yellow(str) ⇒ Object



9
# File 'lib/gramrb/formatter.rb', line 9

def yellow(str) = "\e[33m#{str}\e[0m"