Class: Inventory::Presenter::Table

Inherits:
Base
  • Object
show all
Defined in:
lib/inventory/presenters/table.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Inventory::Presenter::Base

Instance Method Details

#displayObject



4
5
6
7
8
9
# File 'lib/inventory/presenters/table.rb', line 4

def display
  table = Text::Table.new
  table.head = @data.shift
  table.rows = @data
  puts table
end