Class: TestServer::VirusDetector
- Inherits:
-
Object
- Object
- TestServer::VirusDetector
- Includes:
- FeduxOrg::Stdlib::Command::Which, RunCommand
- Defined in:
- lib/test_server/virus_detector.rb
Instance Method Summary collapse
-
#initialize(command: which('clamdscan')) ⇒ VirusDetector
constructor
A new instance of VirusDetector.
- #use(file) ⇒ Object
Methods included from RunCommand
Constructor Details
#initialize(command: which('clamdscan')) ⇒ VirusDetector
Returns a new instance of VirusDetector.
11 12 13 14 |
# File 'lib/test_server/virus_detector.rb', line 11 def initialize(command: which('clamdscan')) @command = command @timeout = 60 end |
Instance Method Details
#use(file) ⇒ Object
16 17 18 |
# File 'lib/test_server/virus_detector.rb', line 16 def use(file) file.virus_id = scan(file) end |