Class: CheckFinishedCommand

Inherits:
AbstractCommand show all
Defined in:
lib/audit/lib/parser/command/check_finished_command.rb

Constant Summary collapse

COMMAND =
"CHECK_FINISHED"

Instance Attribute Summary

Attributes inherited from AbstractCommand

#check, #message, #severity

Instance Method Summary collapse

Methods inherited from AbstractCommand

#process

Constructor Details

#initialize(check, severity, args) ⇒ CheckFinishedCommand

Returns a new instance of CheckFinishedCommand.



35
36
37
38
39
40
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 35

def initialize(check, severity, args)
   @exit_code = args[0] if args.length >= 1 or raise ParseException, "#{check.id} #{COMMAND} did not supply the exit code argument"
	message = args[1 .. -1].join if args.length >= 2

   super(check, severity, message)
end

Instance Method Details

#resultObject



42
43
44
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 42

def result()
  return CheckFinishedCommandResult.new(@check, @severity, @message, @exit_code)
end