Class: DataCommand

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

Constant Summary collapse

COMMAND =
"DATA"

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

Returns a new instance of DataCommand.



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

def initialize(check, severity, args)
	@data = args

 @key = args[0] if args.length >= 1 or raise ParseException, "#{COMMAND} did not supply the data key argument: '#{args}'"
 @value = args[1] if args.length >= 2 or raise ParseException, "#{COMMAND} did not supply the data value argument: '#{args}'"
   super(check, severity, "custom check data")
end

Instance Method Details

#resultObject



40
41
42
# File 'lib/audit/lib/parser/command/data_command.rb', line 40

def result()
  return DataCommandResult.new(@check, @severity, @key, @value)
end