Module: Storazzo::Common
Constant Summary
Constants included
from Colors
Storazzo::Colors::PREPEND_ME
Instance Method Summary
collapse
Methods included from Colors
#azure, #blue, #deb2, #gray, #green, #orange, #pgreen, #pred, #purple, #pwhite, #pyellow, #red, #white, #yellow
Instance Method Details
#bug(s) ⇒ Object
57
58
59
|
# File 'lib/storazzo/common.rb', line 57
def bug(s)
puts "[π] #{gray s}"
end
|
#deb(s) ⇒ Object
36
37
38
|
# File 'lib/storazzo/common.rb', line 36
def deb(s)
puts "[DEBπ] #{yellow(s)}" if _debug_true end
|
#err(str) ⇒ Object
53
54
55
|
# File 'lib/storazzo/common.rb', line 53
def err(str)
puts "[ERRπ] #{red(s)}" end
|
#fatal(s) ⇒ Object
71
72
73
|
# File 'lib/storazzo/common.rb', line 71
def fatal(s)
raise "[FπTAL] #{red s}"
end
|
#if_deb? ⇒ Boolean
41
42
43
44
45
46
47
|
# File 'lib/storazzo/common.rb', line 41
def if_deb?()
if _debug_true deb "== yield START =="
yield
deb "== yield END =="
end
end
|
#linux? ⇒ Boolean
79
80
81
|
# File 'lib/storazzo/common.rb', line 79
def linux?
`uname`.chomp == 'Linux'
end
|
#mac? ⇒ Boolean
75
76
77
|
# File 'lib/storazzo/common.rb', line 75
def mac?
`uname`.chomp == 'Darwin'
end
|
#ppp(complex_object_to_colorize) ⇒ Object
66
67
68
69
|
# File 'lib/storazzo/common.rb', line 66
def ppp(complex_object_to_colorize)
Pry::ColorPrinter.pp(complex_object_to_colorize)
end
|
#pverbose(is_verbose, str) ⇒ Object
61
62
63
64
|
# File 'lib/storazzo/common.rb', line 61
def pverbose(is_verbose, str)
puts "[π¦πππππ·πΈπ¦π¦π¦] #{gray str}" end
|
#warn(s) ⇒ Object
49
50
51
|
# File 'lib/storazzo/common.rb', line 49
def warn(s)
puts "[Wβ οΈRN] #{azure(s)}"
end
|