Class: Dobby::Formatter::JSONFormatter
Overview
Instance Attribute Summary
#options, #output
Instance Method Summary
collapse
#initialize
Instance Method Details
#file_finished(file, results) ⇒ Object
15
16
17
18
19
|
# File 'lib/dobby/formatter/json_formatter.rb', line 15
def file_finished(file, results)
return if results.empty?
@results[file] = each_completed_result(results)
end
|
#file_started(file) ⇒ Object
11
12
13
|
# File 'lib/dobby/formatter/json_formatter.rb', line 11
def file_started(file)
@results[file] = []
end
|
#finished(_files) ⇒ Object
21
22
23
|
# File 'lib/dobby/formatter/json_formatter.rb', line 21
def finished(_files)
output.puts(Oj.dump(@results, mode: :strict))
end
|
#started(_target_files) ⇒ Object
7
8
9
|
# File 'lib/dobby/formatter/json_formatter.rb', line 7
def started(_target_files)
@results = {}
end
|