Class: CpeNameCommand

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

Constant Summary collapse

COMMAND =
"CPE_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) ⇒ CpeNameCommand

Returns a new instance of CpeNameCommand.



27
28
29
30
31
32
# File 'lib/audit/lib/parser/command/cpe_name_command.rb', line 27

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

   super(check, severity, message)
end

Instance Method Details

#resultObject



34
35
36
# File 'lib/audit/lib/parser/command/cpe_name_command.rb', line 34

def result()
  return CpeNameCommandResult.new(@check, @severity, @message, @cpe_name)
end