module ConsoleTable
ConsoleTable
allows you to define a table with columns set to specific sizes, and then give that table rows of data which it will format into a view that fits inside a terminal/console.
- Author
-
Rod Hilton
- License
-
MIT
Public Class Methods
define(layout, options={}, &block)
click to toggle source
Define a console table. Requires a table layout which specifies column information like sizes, titles, and key names.
# File lib/console_table.rb, line 11 def self.define(layout, options={}, &block) table = ConsoleTableClass.new(layout, options) table.send(:print_header) block.call(table) table.send(:print_footer) end