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
59
60
61
|
# File 'lib/storazzo/common.rb', line 59
def bug(s)
puts "[π] #{gray s}"
end
|
#deb(s) ⇒ Object
37
38
39
40
|
# File 'lib/storazzo/common.rb', line 37
def deb(s)
puts "[DEBπ] #{yellow(s)}" if _debug_true end
|
#err(_str) ⇒ Object
55
56
57
|
# File 'lib/storazzo/common.rb', line 55
def err(_str)
puts "[ERRπ] #{red(s)}" end
|
#fatal(s) ⇒ Object
75
76
77
|
# File 'lib/storazzo/common.rb', line 75
def fatal(s)
raise "[FπTAL] #{red s}"
end
|
#if_deb? ⇒ Boolean
43
44
45
46
47
48
49
|
# File 'lib/storazzo/common.rb', line 43
def if_deb?
if _debug_true deb '== yield START =='
yield
deb '== yield END =='
end
end
|
#linux? ⇒ Boolean
83
84
85
|
# File 'lib/storazzo/common.rb', line 83
def linux?
`uname`.chomp == 'Linux'
end
|
#mac? ⇒ Boolean
79
80
81
|
# File 'lib/storazzo/common.rb', line 79
def mac?
`uname`.chomp == 'Darwin'
end
|
#ppp(complex_object_to_colorize) ⇒ Object
70
71
72
73
|
# File 'lib/storazzo/common.rb', line 70
def ppp(complex_object_to_colorize)
Pry::ColorPrinter.pp(complex_object_to_colorize)
end
|
#pverbose(_is_verbose, str) ⇒ Object
63
64
65
66
67
68
|
# File 'lib/storazzo/common.rb', line 63
def pverbose(_is_verbose, str)
return if ENV['RUBYOPT'] == '-W0'
puts "[π¦πππππ·πΈπ¦π¦π¦] #{gray str}" end
|
#warn(s) ⇒ Object
51
52
53
|
# File 'lib/storazzo/common.rb', line 51
def warn(s)
puts "[Wβ οΈRN] #{azure(s)}"
end
|