class Rclam::CLI

Public Instance Methods

scan(location = '/') click to toggle source
# File lib/rclam.rb, line 12
def scan(location = '/')
  not_installed         unless Rclam::ClamAV.installed?
  Rclam::ClamAV.update  unless Rclam::ClamAV.up_to_date?

  puts "Scanning #{File.expand_path(location)}..."
  result = Rclam::ClamAV.scan location
  puts Rclam::Helpers.clamscan_report(result)
end

Private Instance Methods

not_installed() click to toggle source
# File lib/rclam.rb, line 23
def not_installed
  puts "ClamAV is not installed. Please install before running."
  exit 1
end