Class: BitmapCmdEditor::Validators::ClearImageValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/bitmap_cmd_editor/validators/clear_image_validator.rb

Overview

To validate a new bitmap image table created

Author:

  • Diego Hernán Piccinini Lagos

Class Method Summary collapse

Class Method Details

.validate(args) ⇒ Object

Parameters:

  • args (Array)

    the command 0=> ‘C’



8
9
10
11
12
13
14
15
16
# File 'lib/bitmap_cmd_editor/validators/clear_image_validator.rb', line 8

def validate(args)
	begin
		raise ClearImageArgumentError.new(
			ErrorMessage.new(:clear_image_wrongs_arguments).show_content) unless args.count == 1
		:valid
	rescue  => err
		err.message
	end
end