Class: ReVIEW::Converter
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #convert(file, output_path) ⇒ Object
-
#initialize(book, builder) ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
8 9 10 |
# File 'lib/review/converter.rb', line 8 def target @target end |
Instance Method Details
#convert(file, output_path) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/review/converter.rb', line 16 def convert(file, output_path) chap_name = File.basename(file, '.*') chap = @book.chapter(chap_name) result = @compiler.compile(chap) File.open(output_path, 'w') { |f| f.puts result } end |