diff options
| author | mo khan <mo.khan@gmail.com> | 2020-06-03 22:18:57 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-06-03 22:18:57 -0600 |
| commit | 1e4cc139b5c6501a3487a278d0192cce5df7fec5 (patch) | |
| tree | ba01d2314de08a95a57dbef3ce9b1c56de05d9bc /lib | |
| parent | f1aebc6bb691ed39e3aac8c5beb78154cebc27a4 (diff) | |
Inline usage of enhance
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/spandx/cli/commands/scan.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/spandx/cli/commands/scan.rb b/lib/spandx/cli/commands/scan.rb index 5a62d5e..b54e73b 100644 --- a/lib/spandx/cli/commands/scan.rb +++ b/lib/spandx/cli/commands/scan.rb @@ -18,8 +18,8 @@ module Spandx printer.print_header(output) each_file do |file| spinner.spin(file) - each_dependency_from(file) do |dependency| - printer.print_line(dependency, output) + ::Spandx::Core::Parser.parse(file).each do |dependency| + printer.print_line(enhance(dependency), output) end end printer.print_footer(output) @@ -34,13 +34,6 @@ module Spandx .each { |file| yield file } end - def each_dependency_from(file) - ::Spandx::Core::Parser - .parse(file) - .map { |x| enhance(x) } - .each { |dependency| yield dependency } - end - def format(output) Array(output).map(&:to_s) end |
