Class: Dobby::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/dobby/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Runner

Returns a new instance of Runner.



8
9
10
11
12
# File 'lib/dobby/runner.rb', line 8

def initialize(options)
  @options = options
  @errors = []
  @aborting = false
end

Instance Attribute Details

#abortingObject (readonly) Also known as: aborting?

Returns the value of attribute aborting.



5
6
7
# File 'lib/dobby/runner.rb', line 5

def aborting
  @aborting
end

#errorsObject (readonly)

Returns the value of attribute errors.



5
6
7
# File 'lib/dobby/runner.rb', line 5

def errors
  @errors
end

Instance Method Details

#run(paths) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/dobby/runner.rb', line 14

def run(paths)
  target_files = resolve_paths(paths)
  return list_files(target_files) if @options[:list_target_files]

  load_vuln_source(@options[:vuln_source])
  load_package_source(@options[:package_source])
  load_scanner
  inspect_files(target_files)
end