Sha256: 3346f7832ba89652118d4fca9441c671209ff86b255341721ee3d9319bb862b8
Contents?: true
Size: 487 Bytes
Versions: 1
Compression:
Stored size: 487 Bytes
Contents
class Tabled class Template class Row def self.render(row, columns_width, options) row[0..-2].map.with_index { |column, index| spaces = ' ' * (columns_width[index] - column.to_s.size) column.to_s + spaces }.join('') end end end end class Tabled class Template class RowFooter def self.render(row) return nil unless row.last.fetch(:footer, false) row.last.fetch(:footer) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tabled-0.0.1 | lib/template.rb |