clean-my-vomit 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.
Files changed (2) hide show
  1. data/lib/clean-my-vomit.rb +4 -5
  2. metadata +3 -3
@@ -11,8 +11,7 @@ module CleanMyVomit
11
11
  puts " "*depth + " {"
12
12
  polish(key, depth + 3)
13
13
  puts " "*depth + " }"
14
- # NOTE: not just `value`, because `value` could be `false`, in which case we want to print it out
15
- elsif !value.nil?
14
+ elsif value || value == false
16
15
  puts " "*depth + key + " => #{value.to_s}"
17
16
  else
18
17
  puts " "*depth + key.to_s + ""
@@ -22,7 +21,7 @@ module CleanMyVomit
22
21
  end
23
22
  end
24
23
  end
25
-
24
+
26
25
  private
27
26
  def reached_max_recursion_depth?(my_object)
28
27
  !(my_object.respond_to? :each)
@@ -30,7 +29,7 @@ module CleanMyVomit
30
29
 
31
30
  # {"3" => { "3" => "2"}}
32
31
  def print_hash(key, value, depth)
33
- puts " "*depth + key + " {"
32
+ puts " "*depth + key + " =>{"
34
33
  polish(value, depth + 3)
35
34
  puts " "*depth + "}"
36
35
  end
@@ -44,4 +43,4 @@ module CleanMyVomit
44
43
  end
45
44
 
46
45
  Hash.send(:include, CleanMyVomit)
47
- Array.send(:include, CleanMyVomit)
46
+ Array.send(:include, CleanMyVomit)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clean-my-vomit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-19 00:00:00.000000000Z
12
+ date: 2012-06-20 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Ruby gem that makes your long, deeply nested hashes easily displayable
15
15
  in IRB.
@@ -19,7 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - lib/clean-my-vomit.rb
22
- homepage: http://rubygems.org/gems/clean-my-vomit
22
+ homepage: https://github.com/dylandrop/clean-my-vomit
23
23
  licenses: []
24
24
  post_install_message:
25
25
  rdoc_options: []