Module: DangerUndercover::CLI

Defined in:
lib/undercover/cli.rb

Overview

module for undercover-report

Class Method Summary collapse

Class Method Details

.run(args = nil) ⇒ String

Runs the undercover command with provided arguments and writes the output to a file

Returns:

  • (String)


13
14
15
16
17
18
19
# File 'lib/undercover/cli.rb', line 13

def run(args = nil)
  undercover_output = `undercover #{args&.join(' ')}`

  File.write(output_file, undercover_output)

  undercover_output
end