class ClamAV::Commands::ScanCommand

Public Class Methods

new(path, path_finder = Util) click to toggle source
# File lib/clamav/commands/scan_command.rb, line 23
def initialize(path, path_finder = Util)
  @path, @path_finder = path, path_finder
end

Public Instance Methods

call(conn) click to toggle source
# File lib/clamav/commands/scan_command.rb, line 27
def call(conn)
  @path_finder.path_to_files(@path).map { |file| scan_file(conn, file) }
end
scan_file(conn, file) click to toggle source
# File lib/clamav/commands/scan_command.rb, line 31
def scan_file(conn, file)
  get_status_from_response(conn.send_request("SCAN #{file}"))
end