human_hash 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +17 -16
- data/VERSION +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -4,25 +4,26 @@
|
|
4
4
|
This gem adds a human_inspect() method to the Ruby Hash object that returns a Ruby Hash inspection String with a vertical display,
|
5
5
|
something more easily readable by humans (like me), when the Hash is larger than a few keys.
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
puts myhash.human_inspect
|
8
|
+
{
|
9
9
|
:whatever => {
|
10
|
-
:
|
11
|
-
|
12
|
-
:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
10
|
+
:whatever => {
|
11
|
+
:two => "two",
|
12
|
+
:another => {
|
13
|
+
:and => "and",
|
14
|
+
:more => "more"
|
15
|
+
},
|
16
|
+
:array => [0, 1, 2],
|
17
|
+
:one => "one",
|
18
|
+
:bool => true
|
19
|
+
}
|
20
|
+
},
|
21
|
+
2 => "two",
|
22
|
+
4 => "four"
|
23
|
+
}
|
23
24
|
|
24
25
|
human_inspect() will display String keys as symbols by default, but only because this is my personal preference. To show String keys as
|
25
|
-
Strings add false to the method call: puts
|
26
|
+
Strings add false to the method call: puts myhash.human_inspect(false).
|
26
27
|
|
27
28
|
== Copyright
|
28
29
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: human_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Eric Woodward
|