Sha256: c591f33cbc49eeed65b8823e7a837ba01d2035a9ced9aa9d0b4153ad80ea451f

Contents?: true

Size: 591 Bytes

Versions: 12

Compression:

Stored size: 591 Bytes

Contents

# 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.write(output_path, result)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
review-5.10.0 lib/review/converter.rb
review-5.9.0 lib/review/converter.rb
review-5.8.0 lib/review/converter.rb
review-5.7.0 lib/review/converter.rb
review-5.6.0 lib/review/converter.rb
review-5.5.0 lib/review/converter.rb
review-5.4.0 lib/review/converter.rb
review-5.3.0 lib/review/converter.rb
review-5.2.0 lib/review/converter.rb
review-5.1.1 lib/review/converter.rb
review-5.1.0 lib/review/converter.rb
review-5.0.0 lib/review/converter.rb