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 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]
@@ -6,6 +6,6 @@ module Columnizer
6
6
 
7
7
  private
8
8
 
9
- VERSION = [0, 0, 2]
9
+ VERSION = [0, 0, 3]
10
10
 
11
11
  end
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Crepezzi