class Ddr::Antivirus::ScanResult
The result of a virus scan.
Attributes
file_path[R]
output[R]
scanned_at[R]
version[R]
Public Class Methods
new(file_path, output, scanned_at: nil, version: nil)
click to toggle source
# File lib/ddr/antivirus/scan_result.rb, line 9 def initialize(file_path, output, scanned_at: nil, version: nil) @file_path = file_path @output = output @scanned_at = scanned_at || default_time @version = version || default_version end
Public Instance Methods
default_time()
click to toggle source
Default time of virus scan - i.e., now. @return [Time] the time.
# File lib/ddr/antivirus/scan_result.rb, line 18 def default_time Time.now.utc end
default_version()
click to toggle source
Default anti-virus software version information. @return [String] the version.
# File lib/ddr/antivirus/scan_result.rb, line 24 def default_version "ddr-antivirus #{Ddr::Antivirus::VERSION}" end
to_s()
click to toggle source
String representation of the result @return [String] the representation.
# File lib/ddr/antivirus/scan_result.rb, line 30 def to_s "#{output}\n[#{version}]" end