Sha256: d249c923eb8687e6bcd8a1c34a90b9589c566a05147983d43e8bb509c3ad7b40
Contents?: true
Size: 647 Bytes
Versions: 3
Compression:
Stored size: 647 Bytes
Contents
# encoding: utf-8 # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # module ReVIEW class Converter attr_accessor :target def initialize(book, builder) @book = book @book.config["builder"] = builder.target_name @compiler = ReVIEW::Compiler.new(builder) end 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 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
review-2.2.0 | lib/review/converter.rb |
review-2.1.0 | lib/review/converter.rb |
review-2.0.0 | lib/review/converter.rb |