Module: ArchUnit::GraphReporting::Rendering::ExportReport

Defined in:
lib/archunit/graph/rendering/export_report.rb

Overview

UTF-8 file export shared by every graph report format.

Class Method Summary collapse

Class Method Details

.write(output_path, content) ⇒ Object



12
13
14
15
16
17
# File 'lib/archunit/graph/rendering/export_report.rb', line 12

def write(output_path, content)
  path = normalized_path(output_path)
  FileUtils.mkdir_p(File.dirname(path)) unless File.dirname(path) == '.'
  File.binwrite(path, content.encode(Encoding::UTF_8))
  nil
end