Class: Ddr::Antivirus::ClamdScanResult Private
- Inherits:
-
ScanResult
- Object
- ScanResult
- Ddr::Antivirus::ClamdScanResult
- Defined in:
- lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Result of a scan with the ClamdScannerAdapter
Instance Attribute Summary
Attributes inherited from ScanResult
#file_path, #output, #scanned_at, #version
Instance Method Summary collapse
- #error? ⇒ Boolean private
- #has_virus? ⇒ Boolean private
- #ok? ⇒ Boolean private
- #virus_found ⇒ Object private
Methods inherited from ScanResult
#default_time, #default_version, #initialize, #to_s
Constructor Details
This class inherits a constructor from Ddr::Antivirus::ScanResult
Instance Method Details
#error? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
79 80 81 |
# File 'lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb', line 79 def error? status.exitstatus == 2 end |
#has_virus? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
75 76 77 |
# File 'lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb', line 75 def has_virus? status.exitstatus == 1 end |
#ok? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
71 72 73 |
# File 'lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb', line 71 def ok? status.exitstatus == 0 end |
#virus_found ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
65 66 67 68 69 |
# File 'lib/ddr/antivirus/adapters/clamd_scanner_adapter.rb', line 65 def virus_found if m = /: ([^\s]+) FOUND$/.match(output) m[1] end end |