Class: Bitmapped::Commands::ClearCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Bitmapped::Commands::ClearCommand
- Defined in:
- lib/bitmapped/commands/clear_command.rb
Instance Method Summary collapse
Instance Method Details
#command_id ⇒ Object
7 8 9 |
# File 'lib/bitmapped/commands/clear_command.rb', line 7 def command_id "C" end |
#process_command(bitmap, input) ⇒ Object
11 12 13 14 |
# File 'lib/bitmapped/commands/clear_command.rb', line 11 def process_command(bitmap, input) Validators::ValidateBitmapInitialised.parse_and_validate(bitmap) bitmap.pixels = Array.new(bitmap.rows) { Array.new(bitmap.columns) { "O" } } end |