Class: ProgramNameCommand

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

Constant Summary collapse

COMMAND =
"PROGRAM_NAME"

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) ⇒ ProgramNameCommand

Returns a new instance of ProgramNameCommand.



31
32
33
34
35
36
37
# File 'lib/audit/lib/parser/command/program_name_command.rb', line 31

def initialize(check, severity, args)
	@name = args[0].strip if args.length >= 1 or raise ParseException "#{COMMAND} did not supply the program name argument: '#{text}'"
	@version = args[1].strip if args.length >= 2
	message = (args.length >= 3 ? args[2 .. -1].join : nil)

   super(check, severity, message)
end

Instance Method Details

#resultObject



39
40
41
# File 'lib/audit/lib/parser/command/program_name_command.rb', line 39

def result()
  return ProgramNameCommandResult.new(@check, @severity, @message, @name, @version)
end