Class: Spandx::Cli::Printers::Json
- Inherits:
-
Spandx::Cli::Printer
- Object
- Spandx::Cli::Printer
- Spandx::Cli::Printers::Json
- Defined in:
- lib/spandx/cli/printers/json.rb
Instance Method Summary collapse
Methods inherited from Spandx::Cli::Printer
for, #print_footer, #print_header
Methods included from Spandx::Core::Registerable
#all, #each, #inherited, #registry
Instance Method Details
#match?(format) ⇒ Boolean
7 8 9 |
# File 'lib/spandx/cli/printers/json.rb', line 7 def match?(format) format.to_sym == :json end |
#print_line(dependency, io) ⇒ Object
11 12 13 |
# File 'lib/spandx/cli/printers/json.rb', line 11 def print_line(dependency, io) io.puts(Oj.dump(dependency.to_h)) end |