Class: Printer
- Inherits:
-
Object
- Object
- Printer
- Defined in:
- lib/teecket/printer.rb
Class Method Summary collapse
Class Method Details
.table(rows = []) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/teecket/printer.rb', line 4 def self.table(rows = []) headings = ['Flight', 'Flight #', 'Origin', 'Destination', 'Depart', 'Arrive', 'Fare (RM)'] new_rows = rows.map { |row| row.values } Terminal::Table.new(headings: headings, rows: new_rows) end |