columnizer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/columnizer.rb +1 -1
- data/lib/columnizer/version.rb +1 -1
- metadata +3 -3
data/lib/columnizer.rb
CHANGED
@@ -11,7 +11,7 @@ module Columnizer
|
|
11
11
|
str = ''
|
12
12
|
data.each do |row|
|
13
13
|
row.each_with_index do |field, index|
|
14
|
-
str += field.to_s + ' ' * (sizes[index] - field.size + (index == sizes.size - 1 ? 0 : options[:padding] || 0))
|
14
|
+
str += field.to_s + ' ' * (sizes[index] - field.to_s.size + (index == sizes.size - 1 ? 0 : options[:padding] || 0))
|
15
15
|
end
|
16
16
|
for index in row.size...sizes.size do # pad out
|
17
17
|
str += ' ' * sizes[index]
|
data/lib/columnizer/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: columnizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Crepezzi
|