Class: CheckFinishedCommandResult
- Inherits:
-
AbstractCommandResult
- Object
- AbstractCommandResult
- CheckFinishedCommandResult
- Defined in:
- lib/audit/lib/parser/command/check_finished_command.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
Attributes inherited from AbstractCommandResult
#check, #message, #severity, #type
Instance Method Summary collapse
-
#initialize(check, severity, message, exit_code) ⇒ CheckFinishedCommandResult
constructor
A new instance of CheckFinishedCommandResult.
- #to_hash ⇒ Object
- #to_string ⇒ Object
- #visible? ⇒ Boolean
Constructor Details
#initialize(check, severity, message, exit_code) ⇒ CheckFinishedCommandResult
Returns a new instance of CheckFinishedCommandResult.
10 11 12 13 |
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 10 def initialize(check, severity, , exit_code) super(check, severity, , ResultType::CHECK_FINISHED) @exit_code = exit_code end |
Instance Attribute Details
#exit_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
8 9 10 |
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 8 def exit_code @exit_code end |
Instance Method Details
#to_hash ⇒ Object
23 24 25 |
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 23 def to_hash() return super.to_hash().merge({:exit_code => @exit_code}) end |
#to_string ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 15 def to_string() if then return "Check #{@check.id} finished: #{@message}" else return "Check #{@check.id} has finished" end end |
#visible? ⇒ Boolean
27 28 29 |
# File 'lib/audit/lib/parser/command/check_finished_command.rb', line 27 def visible? return false end |