lib/spandx/report.rb in spandx-0.1.3 vs lib/spandx/report.rb in spandx-0.1.4

- old
+ new

@@ -4,15 +4,11 @@ class Report def initialize(report: { version: '1.0', packages: [] }) @report = report end - def add(name:, version:, licenses: []) - @report[:packages].push( - name: name, - version: version, - licenses: licenses.map(&:id) - ) + def add(dependency) + @report[:packages].push(dependency.to_h) end def to_h @report end