module Asciidoctor::Writer
A module that can be used to mix the {#write} method into a {Converter} implementation to allow the converter to control how the output is written to disk.
Public Instance Methods
Source
# File lib/asciidoctor/writer.rb, line 12 def write output, target if target.respond_to? :write # ensure there's a trailing newline to be nice to terminals target.write output.chomp + LF else # QUESTION shouldn't we ensure a trailing newline here too? ::File.write target, output, mode: FILE_WRITE_MODE end nil end