Module: OutputHelpers::Output

Extended by:
Output
Included in:
Output
Defined in:
lib/dmg/output_helpers.rb

Instance Method Summary collapse

Instance Method Details

#blue(text) ⇒ Object



46
47
48
# File 'lib/dmg/output_helpers.rb', line 46

def blue(text)
  color(text, "\e[34m")
end

#bold(text) ⇒ Object



22
23
24
# File 'lib/dmg/output_helpers.rb', line 22

def bold(text)
  color(text, "\e[1m")
end

#color(text, color_code) ⇒ Object



18
19
20
# File 'lib/dmg/output_helpers.rb', line 18

def color(text, color_code)
  "#{color_code}#{text}\e[0m"
end

#green(text) ⇒ Object



30
31
32
# File 'lib/dmg/output_helpers.rb', line 30

def green(text)
  color(text, "\e[32m")
end

#grey(text) ⇒ Object



50
51
52
# File 'lib/dmg/output_helpers.rb', line 50

def grey(text)
  color(text, "\e[90m")
end

#magenta(text) ⇒ Object



38
39
40
# File 'lib/dmg/output_helpers.rb', line 38

def magenta(text)
  color(text, "\e[35m")
end

#red(text) ⇒ Object



34
35
36
# File 'lib/dmg/output_helpers.rb', line 34

def red(text)
  color(text, "\e[31m")
end

#white(text) ⇒ Object



26
27
28
# File 'lib/dmg/output_helpers.rb', line 26

def white(text)
  color(text, "\e[37m")
end

#yellow(text) ⇒ Object



42
43
44
# File 'lib/dmg/output_helpers.rb', line 42

def yellow(text)
  color(text, "\e[33m")
end