super_p 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/super_p.rb +19 -17
- data/lib/super_p/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8dff1daee27bd339744c364299d5a0f6bafe3a8
|
4
|
+
data.tar.gz: d767371561d6bc39969e23979de5853a191fb435
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67b09b2e0636d60202a5183b322a1bc979fea283c2ff7bc5dcb9c8d4a6278345279b4c775732152c31d788fb4248507b33765bc476475f66659b3c1ca069c37d
|
7
|
+
data.tar.gz: d5118cb4d9acbed98815c7b361ce07c31ce2def4bb6915de3371118597ec17a508a4cadbaeadcd333e17f3198c873b97156f196e3a88bfaa6f4bc76750be8c17
|
data/README.md
CHANGED
data/lib/super_p.rb
CHANGED
@@ -8,24 +8,26 @@ end
|
|
8
8
|
|
9
9
|
module Kernel
|
10
10
|
def super_p(*args)
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
11
|
+
cols = `tput cols`.to_i
|
12
|
+
puts
|
13
|
+
print SuperP.color || "\e[45;35m"
|
14
|
+
puts " " * cols
|
15
|
+
puts *(args.map do |i|
|
16
|
+
text = i.inspect
|
17
|
+
padding = if text.size < cols
|
18
|
+
cols - text.size
|
19
|
+
else
|
20
|
+
cols - text.size % cols
|
21
|
+
end
|
22
|
+
text + " " * padding
|
23
|
+
end)
|
24
|
+
puts " " * cols
|
25
|
+
print "\e[0m"
|
26
|
+
puts " " * cols
|
27
|
+
|
28
28
|
args.size == 1 ? args[0] : args
|
29
|
+
rescue
|
30
|
+
print "\e[0m"
|
29
31
|
end
|
30
32
|
|
31
33
|
alias_method :sp, :super_p
|
data/lib/super_p/version.rb
CHANGED