Class: Rack::SecureUpload::Scanner::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/secure_upload/scanner/base.rb

Direct Known Subclasses

Avast, Fsecure

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.

Raises:



10
11
12
13
# File 'lib/rack/secure_upload/scanner/base.rb', line 10

def initialize(options = {})
  raise RuntimeError, 'Abstract class can not be instantiated' if self.class == Rack::SecureUpload::Scanner::Base
  @options = default_options.merge(options)
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



8
9
10
# File 'lib/rack/secure_upload/scanner/base.rb', line 8

def logger
  @logger
end

#optionsObject (readonly)

Returns the value of attribute options.



8
9
10
# File 'lib/rack/secure_upload/scanner/base.rb', line 8

def options
  @options
end

Instance Method Details

#scan(path) ⇒ Object



18
19
20
# File 'lib/rack/secure_upload/scanner/base.rb', line 18

def scan(path)
  # Scan the file here
end

#setupObject



15
16
# File 'lib/rack/secure_upload/scanner/base.rb', line 15

def setup
end