Class: BitmapCmdEditor::Validators::PrintTableValidator

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

Overview

To validate a command print table

Author:

  • Diego Hernán Piccinini Lagos

Class Method Summary collapse

Class Method Details

.validate(args) ⇒ Object

Parameters:

  • args (Array)

    the command 0=> ‘S’



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

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