rainbow_hash 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/rainbow_hash/display.rb +5 -1
- data/lib/rainbow_hash/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: a5ab778bb4e781e3a46b881a1375dd7fc182164c
|
4
|
+
data.tar.gz: 15f6411e5600d684f9d196740cc10a5423484b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79454e0911b8d038b9d169d865b4b9a318c29f10aff7e4c85d9acf2eb4e973bbc2277829cd2e1bfa5c2203bf5be9cbb9b3302745c9297f2eefeacba6d201aaa3
|
7
|
+
data.tar.gz: 7c1469cc8b487fe12359d5cfe573d81be4b4ec05f7ebd07cf2dc5f6964e86aa1228040b009098390a9cd2643abc4f9f6856e1c2ed7c0a10a6469d4ee30bb9832
|
data/README.md
CHANGED
@@ -18,11 +18,11 @@ From your terminal, run the `rainbow` command followed by your data structure su
|
|
18
18
|
|
19
19
|
For example, if you wanted to view the following hash in your terminal:
|
20
20
|
|
21
|
-
['TEST', {a: 1, [2, 3, 4, {cow: 'moo'}]}]
|
21
|
+
['TEST', {a: 1, b: [2, 3, 4, {cow: 'moo'}]}]
|
22
22
|
|
23
23
|
you would run:
|
24
24
|
|
25
|
-
$ rainbow "['TEST', {a: 1, [2, 3, 4, {cow: 'moo'}]}]"
|
25
|
+
$ rainbow "['TEST', {a: 1, b: [2, 3, 4, {cow: 'moo'}]}]"
|
26
26
|
|
27
27
|
And watch the results!
|
28
28
|
|
data/lib/rainbow_hash/display.rb
CHANGED
@@ -39,7 +39,11 @@ module RainbowHash
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def colorize(char)
|
42
|
-
|
42
|
+
if beginning_delimeter?(char) || ending_delimeter?(char)
|
43
|
+
"\e[#{@color_stack}m\e[1m#{char}\e[0m"
|
44
|
+
else
|
45
|
+
"\e[#{@color_stack}m#{char}\e[0m"
|
46
|
+
end
|
43
47
|
end
|
44
48
|
|
45
49
|
def increment_level
|
data/lib/rainbow_hash/version.rb
CHANGED