Class: Dependabot::CLI::Scan

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/cli/scan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, options) ⇒ Scan

Returns a new instance of Scan.



8
9
10
11
# File 'lib/dependabot/cli/scan.rb', line 8

def initialize(path, options)
  @path = ::Pathname.new(path)
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/dependabot/cli/scan.rb', line 6

def options
  @options
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/dependabot/cli/scan.rb', line 6

def path
  @path
end

Instance Method Details

#runObject



13
14
15
16
17
# File 'lib/dependabot/cli/scan.rb', line 13

def run
  each_dependency do |dependency|
    update(dependency) if match?(dependency)
  end
end