ruby-zoom 3.3.3 → 3.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/string.rb +17 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2fe0c7b9edfb4b70dd62eed194b898d5f643584
|
4
|
+
data.tar.gz: 3f3b1dae2223279ec40e6b63ad0c4ff2c87742a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb1bc59c381e3f2f33de4a4f2f20c81187a83c5c45ee332ac910dc4c9429b5b1cbbf7f619c3626a1cc1ef271304c087f431d95a0ca384761d0cb9cb1052aebb2
|
7
|
+
data.tar.gz: a833cb609d4eed8cafcb6b93f883f1c5527164a72bc6aa1c62368b5e0dea6d468be3507c9de12135e0da92cec093ce6036619536511e2f1eec1795f9377183b2
|
data/lib/string.rb
CHANGED
@@ -1,17 +1,29 @@
|
|
1
1
|
# Redefine String class to allow for colorizing, rsplit, and word wrap
|
2
2
|
class String
|
3
|
+
def black
|
4
|
+
return colorize(30)
|
5
|
+
end
|
6
|
+
|
3
7
|
def blue
|
4
|
-
return colorize(
|
8
|
+
return colorize(34)
|
5
9
|
end
|
6
10
|
|
7
11
|
def colorize(color)
|
8
12
|
return "\e[#{color}m#{self}\e[0m"
|
9
13
|
end
|
10
14
|
|
15
|
+
def cyan
|
16
|
+
return colorise(36)
|
17
|
+
end
|
18
|
+
|
11
19
|
def green
|
12
20
|
return colorize(32)
|
13
21
|
end
|
14
22
|
|
23
|
+
def purple
|
24
|
+
return colorize(35)
|
25
|
+
end
|
26
|
+
|
15
27
|
def red
|
16
28
|
return colorize(31)
|
17
29
|
end
|
@@ -29,4 +41,8 @@ class String
|
|
29
41
|
def word_wrap(width = 70)
|
30
42
|
return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
|
31
43
|
end
|
44
|
+
|
45
|
+
def yellow
|
46
|
+
return colorize(33)
|
47
|
+
end
|
32
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-zoom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|