lib/docparser/output/multi_output.rb in docparser-0.0.1 vs lib/docparser/output/multi_output.rb in docparser-0.1.0

- old
+ new

@@ -22,29 +22,25 @@ jsonoptions[:filename] += '.json' @outputs << CSVOutput.new(csvoptions) @outputs << HTMLOutput.new(htmloptions) @outputs << YAMLOutput.new(yamloptions) @outputs << XLSXOutput.new(xlsxoptions) - @outputs << XLSXOutput.new(jsonoptions) + @outputs << JSONOutput.new(jsonoptions) end def header=(row) - @outputs.each { |out| out.header = row.flatten } + @outputs.each { |out| out.header = row } end def add_row(row) - @outputs.each { |out| out.add_row row.flatten } + @outputs.each { |out| out.add_row row } end def rowcount - @outputs.min { |out| out.rowcount }.rowcount + @outputs.map { |out| out.rowcount }.min end def close @outputs.each { |out| out.close } - end - - def summary - @outputs.map { |out| out.summary }.join("\n") end end end \ No newline at end of file