Class: Util::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/utilities/utils.rb

Overview

B.1. MESSAGES —————————————————————————————————–

Instance Method Summary collapse

Instance Method Details

#error(msg) ⇒ Object

B.1.3. ERROR MESSAGE



46
47
48
49
50
51
52
53
54
55
# File 'lib/utilities/utils.rb', line 46

def error(msg)

  puts ""
  puts Paint["[ERROR]", :red]
  puts Paint[msg, :red]
  puts ""

  exit 1

end

#heading(msg) ⇒ Object

B.1.4. HEADING



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/utilities/utils.rb', line 61

def heading(msg)

  puts ""
  puts Paint["----------------------------------------------------------------------------", :cyan]
  puts Paint["--", :cyan]
  puts Paint["--  #{ msg }", :cyan]
  puts Paint["--", :cyan]
  puts Paint["----------------------------------------------------------------------------", :cyan]
  puts ""

end

#paragraph(msg) ⇒ Object

B.1.5. PARAGRAPH



77
78
79
80
81
82
83
# File 'lib/utilities/utils.rb', line 77

def paragraph(msg)

  puts ""
  puts Paint[msg, "999999"]
  puts ""

end

#success(msg) ⇒ Object

B.1.2. SUCCESS MESSAGE



33
34
35
36
37
38
39
40
# File 'lib/utilities/utils.rb', line 33

def success(msg)

  puts ""
  puts Paint["[SUCCESS]", :green]
  puts Paint[msg, :green]
  puts ""

end

#warning(msg) ⇒ Object

B.1.1. WARNING MESSAGE



20
21
22
23
24
25
26
27
# File 'lib/utilities/utils.rb', line 20

def warning(msg)

  puts ""
  puts Paint["[WARNING:]", :yellow]
  puts Paint[msg, :yellow]
  puts ""

end