Sha256: 7d5d39b2b7a926a6f9255652dad39fb23dad41841e85af56062283834e019c58
Contents?: true
Size: 522 Bytes
Versions: 12
Compression:
Stored size: 522 Bytes
Contents
% max_id_len = users.map { |u| u.id.size }.max % max_name_len = users.map { |u| u.firstname.size + u.lastname.size + 1 }.max % max_email_len = users.map { |u| u.mail? ? u.mail.size : 0 }.max % % if users.size > 1 <%= 'id'.ljust(max_id_len).yellow %> | <%= 'name'.center(max_name_len).yellow %> | <%= 'e-mail'.center(max_email_len).yellow + "\n" %> % end % % users.each do |u| % name = u.firstname + ' ' + u.lastname <%= u.id.ljust(max_id_len) %> <%= name.ljust(max_name_len) %> <%= "#{u.mail? && u.mail}\n" %> % end
Version data entries
12 entries across 12 versions & 1 rubygems