Class: Bitmapped::Commands::PrintFancyTableCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/bitmapped/commands/print_fancy_table_command.rb

Instance Method Summary collapse

Instance Method Details

#command_idObject



9
10
11
# File 'lib/bitmapped/commands/print_fancy_table_command.rb', line 9

def command_id
  "T"
end

#process_command(bitmap, input) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/bitmapped/commands/print_fancy_table_command.rb', line 13

def process_command(bitmap, input)
  Validators::ValidateBitmapInitialised.parse_and_validate(bitmap)
  bitmap.table ||= Terminal::Table.new
  bitmap.table.rows = bitmap.pixels
  puts bitmap.table
  bitmap.table
end