Class: AbstractCommand
- Inherits:
-
Object
- Object
- AbstractCommand
- Defined in:
- lib/audit/lib/parser/command/abstract_command.rb
Overview
The superclass for all response commands from scripts each subclass must have a constant named COMMAND, which is the string version of the command as sent by the worker script
Direct Known Subclasses
AttachFileCommand, CheckFinishedCommand, CpeNameCommand, DataCommand, ListeningPortCommand, MessageCommand, ProgramNameCommand
Instance Attribute Summary collapse
-
#check ⇒ Object
readonly
The check that issued this command.
-
#message ⇒ Object
readonly
The message associated with this command.
-
#severity ⇒ Object
readonly
The severity of this command.
Instance Method Summary collapse
-
#initialize(check, severity, message) ⇒ AbstractCommand
constructor
Create a new AbstractCommand.
-
#process(parser) ⇒ Object
Abstract method to be implemented by subclasses.
-
#result ⇒ Object
Abstract method to be implemented by subclasses.
Constructor Details
#initialize(check, severity, message) ⇒ AbstractCommand
Create a new AbstractCommand. Should only be called from subclasses, as this class is abstract,
-
check
-
severity
-
message
17 18 19 20 21 |
# File 'lib/audit/lib/parser/command/abstract_command.rb', line 17 def initialize(check, severity, ) @check = check @severity = severity @message = end |
Instance Attribute Details
#check ⇒ Object (readonly)
The check that issued this command.
6 7 8 |
# File 'lib/audit/lib/parser/command/abstract_command.rb', line 6 def check @check end |
#message ⇒ Object (readonly)
The message associated with this command.
10 11 12 |
# File 'lib/audit/lib/parser/command/abstract_command.rb', line 10 def @message end |
#severity ⇒ Object (readonly)
The severity of this command.
8 9 10 |
# File 'lib/audit/lib/parser/command/abstract_command.rb', line 8 def severity @severity end |
Instance Method Details
#process(parser) ⇒ Object
Abstract method to be implemented by subclasses. Perform any action neccessary to obtain results, like copying a file to the local host.
25 26 |
# File 'lib/audit/lib/parser/command/abstract_command.rb', line 25 def process(parser) end |
#result ⇒ Object
Abstract method to be implemented by subclasses. return a result object, contained in an instance of kind AbstractCommandResult
30 31 |
# File 'lib/audit/lib/parser/command/abstract_command.rb', line 30 def result() end |