terminal-table-unicode 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c0622024838175ea31024738de649f6cb1b2e58
4
- data.tar.gz: c38b4f6979fe47bffb9564abffa5ea475f27bb61
3
+ metadata.gz: 9e82857fbd781ffcb46e9fedb14f7fadc785ca68
4
+ data.tar.gz: dc8c3650797f52c2a5f463edd5f4029a8cfc8220
5
5
  SHA512:
6
- metadata.gz: e1839d939d6c5baff6c685ada5726ed40cdc50bd1e07d5214fb5feca00120ae99df73ad86010c66b8ee6c363671947edbc495cadc5596f7cfe89708cf184ff33
7
- data.tar.gz: ead36ebd0e44a8f487bab18e78a0dd9fb29edb3282f7704028207967343bcb5b68e490ee501f6f15abc08e7a7d4cdb291ce550e8760c3240417c11be0710e370
6
+ metadata.gz: 887a7592a8772438037f364a48e0a21275ba9a00fa8e41539ecef55b49c7d4949361d5445ca9983dd6ed41eda55ae02466319c107285ba280498e4d8dddcbe6e
7
+ data.tar.gz: e1675f7c878de49f6ae1c551d0d084970b1cadaa3f14009e40ea015ce28c45806b91aa354b03a900a28c95b277b640e29874895ffa1439cca4bbd5e9616e95b5
@@ -1,6 +1,7 @@
1
1
  module Terminal
2
2
  class Table
3
3
  class Cell
4
+ undef :align
4
5
  def align(val, position, length)
5
6
  # positions = { :left => :ljust, :right => :rjust, :center => :center }
6
7
  positions = { left: :mb_ljust, right: :mb_rjust, center: :mb_center }
@@ -2,13 +2,14 @@ module Terminal
2
2
  class Table
3
3
  private
4
4
 
5
- def recalc_column_widths row
5
+ undef :recalc_column_widths
6
+ def recalc_column_widths(row)
6
7
  return if row.is_a? Separator
7
8
  i = 0
8
9
  row.cells.each do |cell|
9
10
  colspan = cell.colspan
10
11
  cell_value = cell.value_for_column_width_recalc
11
- colspan.downto(1) do |j|
12
+ colspan.downto(1) do |_j|
12
13
  # cell_length = cell_value.to_s.length
13
14
  cell_length = cell_value.to_s.display_width
14
15
  if colspan > 1
@@ -19,7 +20,7 @@ module Terminal
19
20
  if @column_widths[i].to_i < cell_length
20
21
  @column_widths[i] = cell_length
21
22
  end
22
- i = i + 1
23
+ i += 1
23
24
  end
24
25
  end
25
26
  end
@@ -1,7 +1,7 @@
1
1
  module Terminal
2
2
  class Table
3
3
  module Unicode
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal-table-unicode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - rochefort