Class: Spandx::Cli::Commands::Scan
- Inherits:
-
Object
- Object
- Spandx::Cli::Commands::Scan
- Includes:
- Spandx::Core
- Defined in:
- lib/spandx/cli/commands/scan.rb
Instance Attribute Summary collapse
-
#scan_path ⇒ Object
readonly
Returns the value of attribute scan_path.
Instance Method Summary collapse
- #execute(output: $stdout) ⇒ Object
-
#initialize(scan_path, options) ⇒ Scan
constructor
A new instance of Scan.
Constructor Details
#initialize(scan_path, options) ⇒ Scan
Returns a new instance of Scan.
10 11 12 13 14 |
# File 'lib/spandx/cli/commands/scan.rb', line 10 def initialize(scan_path, ) @scan_path = ::Pathname.new(scan_path) = require([:require]) if [:require] end |
Instance Attribute Details
#scan_path ⇒ Object (readonly)
Returns the value of attribute scan_path.
8 9 10 |
# File 'lib/spandx/cli/commands/scan.rb', line 8 def scan_path @scan_path end |
Instance Method Details
#execute(output: $stdout) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/spandx/cli/commands/scan.rb', line 16 def execute(output: $stdout) with_printer(output) do |printer| each_dependency do |dependency| printer.print_line(Plugin.enhance(dependency), output) end end end |