# File ../../../../../lib/review/converter.rb, line 11 def initialize(book, builder) @book = book @book.config["builder"] = builder.target_name @compiler = ReVIEW::Compiler.new(builder) end
# File ../../../../../lib/review/converter.rb, line 17 def convert(file, output_path) chap_name = File.basename(file, '.*') chap = @book.chapter(chap_name) result = @compiler.compile(chap) File.open(output_path, 'w') do |f| f.puts result end end