a guest Jul 22nd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # takes an array of hashes and prints as a table on the console
  2. def table_print(rows)
  3.   table = [] + { |v| }
  4.   sizes = { |row| }
  5.   puts { |row| { |txt, idx| txt.rjust(sizes[idx]) }.join("\t") }.join("\n")
  6. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand