Class: Tabled::Template::Titles

Inherits:
Object
  • Object
show all
Defined in:
lib/template.rb

Class Method Summary collapse

Class Method Details

.render(row, columns_width, _is_framed) ⇒ Object


| Name Height Gender |




19
20
21
22
23
24
# File 'lib/template.rb', line 19

def self.render(row, columns_width, _is_framed)
  row.map.with_index do |column, index|
    spaces = ' ' * (columns_width[index] - column.to_s.size)
    column.to_s + spaces
  end.join
end