Sha256: fc98104879474fff7b4d5951466a3d3ae660ddbb5ece10ece5cfb499a7f69b1c

Contents?: true

Size: 411 Bytes

Versions: 1

Compression:

Stored size: 411 Bytes

Contents

require 'bitmapped/commands/base_command'

module Bitmapped
  module Commands
    class PrintTableCommand < BaseCommand

      def command_id
        "S"
      end

      def process_command(bitmap, input)
        Validators::ValidateBitmapInitialised.parse_and_validate(bitmap)
        table = bitmap.pixels.collect { |row| row.join("") }.join("\n")
        puts table
        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_table_command.rb