colorful_inspect 0.0.1 → 0.0.2

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/colorful_inspect.rb +4 -4
  2. metadata +2 -2
@@ -40,7 +40,7 @@ module ColorfulInspect
40
40
  end
41
41
 
42
42
  def break(q)
43
- q.breakable ''
43
+ q.text "\n#{q.genspace[q.indent]}"
44
44
  end
45
45
 
46
46
  def colorize(q, type, string)
@@ -101,7 +101,7 @@ class Array
101
101
  index_width = (size - 1).to_s.size
102
102
 
103
103
  each_with_index do |elem, n|
104
- q.breakable ''
104
+ ColorfulInspect.break q
105
105
  q.text "[#{n.to_s.rjust(index_width)}] "
106
106
  q.pp elem
107
107
  q.text "," if n != size - 1
@@ -118,7 +118,7 @@ class Hash
118
118
 
119
119
  ColorfulInspect.group(q, "{", "}") do
120
120
  each_with_index do |(key, val), n|
121
- q.breakable ''
121
+ ColorfulInspect.break q
122
122
  q.pp key
123
123
  q.text " => "
124
124
  q.pp val
@@ -239,7 +239,7 @@ class Struct
239
239
 
240
240
  ColorfulInspect.group(q, "{", "}") do
241
241
  each_pair.with_index do |(key, val), n|
242
- q.breakable ''
242
+ ColorfulInspect.break q
243
243
  q.pp key
244
244
  q.text " => "
245
245
  q.pp val
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: colorful_inspect
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Mon ou\xC3\xAFe"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-09 00:00:00 Z
13
+ date: 2011-06-10 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: term-ansicolor