Class: DataCommand
- Inherits:
-
AbstractCommand
- Object
- AbstractCommand
- DataCommand
- Defined in:
- lib/audit/lib/parser/command/data_command.rb
Constant Summary collapse
- COMMAND =
"DATA"
Instance Attribute Summary
Attributes inherited from AbstractCommand
Instance Method Summary collapse
-
#initialize(check, severity, args) ⇒ DataCommand
constructor
A new instance of DataCommand.
- #result ⇒ Object
Methods inherited from AbstractCommand
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
#result ⇒ Object
40 41 42 |
# File 'lib/audit/lib/parser/command/data_command.rb', line 40 def result() return DataCommandResult.new(@check, @severity, @key, @value) end |