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



52
53
54
55
56
57
58
59
60
61
# File 'lib/utilities/utils.rb', line 52

def error(msg)
    
    puts ""
    puts Paint["ERROR:", :red]
    puts Paint[msg, :red] 
    puts ""
    
    exit 1
    
end

#heading(msg) ⇒ Object

B.1.4. HEADING



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/utilities/utils.rb', line 67

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



87
88
89
90
91
92
93
94
95
# File 'lib/utilities/utils.rb', line 87

def paragraph(msg)
    
    puts ""
    
    puts Paint[msg, "999999"]
    
    puts ""
    
end

#success(msg) ⇒ Object

B.1.2. SUCCESS MESSAGE



39
40
41
42
43
44
45
46
# File 'lib/utilities/utils.rb', line 39

def success(msg)
    
    puts ""
    puts Paint["SUCCESS:", :green]
    puts Paint[msg, :green] 
    puts ""
    
end

#warning(msg) ⇒ Object

B.1.1. WARNING MESSAGE



26
27
28
29
30
31
32
33
# File 'lib/utilities/utils.rb', line 26

def warning(msg)
    
    puts ""
    puts Paint["WARNING:", :yellow]
    puts Paint[msg, :yellow] 
    puts ""
    
end