class Ratonvirus::Scanner::Resty
Public Class Methods
executable?()
click to toggle source
# File lib/ratonvirus/scanner/resty.rb, line 9 def executable? AntivirusCheckService.installed? end
Protected Instance Methods
run_scan(path)
click to toggle source
# File lib/ratonvirus/scanner/resty.rb, line 16 def run_scan(path) if File.file?(path) result = AntivirusCheckService.new(path).call if result.virus? errors << :antivirus_virus_detected end else errors << :antivirus_file_not_found end rescue StandardError errors << :antivirus_client_error end