Class: Editor
- Inherits:
-
Object
- Object
- Editor
- Defined in:
- lib/notroff/text_replacer.rb
Instance Method Summary collapse
-
#initialize(input, output) ⇒ Editor
constructor
A new instance of Editor.
- #process ⇒ Object
Constructor Details
#initialize(input, output) ⇒ Editor
Returns a new instance of Editor.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/notroff/text_replacer.rb', line 18 def initialize( input, output ) @input = input @output = output @processors = [] @processors << TextReader.new( @input ) @processors << CommandProcessor.new @processors << ParagraphTypeAssigner.new @processors << ProgramOutputInserter.new @processors << C1Inserter.new @processors << IncInserter.new @processors << CodeInserter.new @processors << LastOutputInserter.new @processors << CodeTagFilter.new @processors << CodeTypeRefiner.new @processors << OdtRenderer.new @processors << TemplateExpander.new( File.read( ContentTemplate ) ) @processors << OdtReplacer.new( OdtSkeleton, @output ) end |
Instance Method Details
#process ⇒ Object
37 38 39 40 41 42 |
# File 'lib/notroff/text_replacer.rb', line 37 def process result = nil @processors.each do |processor| result = processor.process( result ) end end |