method
build_cells
rails latest stable - Class:
ActiveRecord::ConnectionAdapters::Mysql2Adapter::ExplainPrettyPrinter
build_cells(items, widths)private
No documentation available.
# File activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb, line 169
def build_cells(items, widths)
cells = []
items.each_with_index do |item, i|
item = 'NULL' if item.nil?
justifier = item.is_a?(Numeric) ? 'rjust' : 'ljust'
cells << item.to_s.send(justifier, widths[i])
end
'| ' + cells.join(' | ') + ' |'
end