Class: SpecFormatter

Inherits:
Formatter show all
Defined in:
lib/notroff/formatter.rb

Instance Method Summary collapse

Methods inherited from CompositeProcessor

#add_processor, #dump, #prepend_processor, #process

Constructor Details

#initialize(input, output) ⇒ SpecFormatter

Returns a new instance of SpecFormatter.



58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/notroff/formatter.rb', line 58

def initialize(input, output)
  super()
  prepend_processor RegularExpressionExcludeFilter.new(/^--.*$/)
  prepend_processor FileReader.new(input)
  add_processor BodyTypeRefiner.new
  add_processor CodeTypeRefiner.new
  add_processor CodeTypeRefiner.new(:listing, :first_listing, :middle_listing, :end_listing)
  add_processor Grouper.new(:bullet)
  add_processor Grouper.new(:list)
  add_processor Grouper.new(:quote)
  add_processor Grouper.new(:attribution)
  add_processor SpecRenderer.new
  add_processor FileWriter.new(output)
end