Sha256: de8b73877d9caaf39d5cf4371785b821f31a63b1ec97ebc9286b68724ec8f236

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

require 'bitmapped/commands/base_command'

require 'terminal-table'

module Bitmapped
  module Commands
    class PrintFancyTableCommand < BaseCommand

      def command_id
        "T"
      end

      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bitmapped-0.2.0 lib/bitmapped/commands/print_fancy_table_command.rb