Class: Enolib::TextReporter
- Defined in:
- lib/enolib/reporters/text_reporter.rb
Constant Summary collapse
- INDICATORS =
{ display: ' ', emphasize: '>', indicate: '*', question: '?' }.freeze
Instance Method Summary collapse
-
#initialize(context) ⇒ TextReporter
constructor
A new instance of TextReporter.
Methods inherited from Reporter
#indicate_line, #question_line, #report_comments, #report_element, #report_elements, #report_line, #report_missing_element, #report_multiline_value, #snippet
Constructor Details
#initialize(context) ⇒ TextReporter
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/enolib/reporters/text_reporter.rb', line 12 def initialize(context) super(context) gutter_header = context.::GUTTER_HEADER.rjust(5) columns_header = " #{gutter_header} | #{context.::CONTENT_HEADER}" source = context.source ? "-- #{source} -- \n\n" : '' @gutter_width = gutter_header.length + 3 @header = "#{source}#{columns_header}\n" end |