Class: ImproveYourCode::Report::Formatter::HeadingFormatterBase
- Inherits:
-
Object
- Object
- ImproveYourCode::Report::Formatter::HeadingFormatterBase
- Defined in:
- lib/improve_your_code/report/formatter/heading_formatter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#report_formatter ⇒ Object
readonly
Returns the value of attribute report_formatter.
Instance Method Summary collapse
- #header(examiner) ⇒ Object
-
#initialize(report_formatter) ⇒ HeadingFormatterBase
constructor
A new instance of HeadingFormatterBase.
- #show_header?(_examiner) ⇒ Boolean
Constructor Details
#initialize(report_formatter) ⇒ HeadingFormatterBase
Returns a new instance of HeadingFormatterBase.
9 10 11 |
# File 'lib/improve_your_code/report/formatter/heading_formatter.rb', line 9 def initialize(report_formatter) @report_formatter = report_formatter end |
Instance Attribute Details
#report_formatter ⇒ Object (readonly)
Returns the value of attribute report_formatter.
7 8 9 |
# File 'lib/improve_your_code/report/formatter/heading_formatter.rb', line 7 def report_formatter @report_formatter end |
Instance Method Details
#header(examiner) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/improve_your_code/report/formatter/heading_formatter.rb', line 17 def header(examiner) if show_header?(examiner) report_formatter.header examiner else '' end end |
#show_header?(_examiner) ⇒ Boolean
13 14 15 |
# File 'lib/improve_your_code/report/formatter/heading_formatter.rb', line 13 def show_header?(_examiner) raise NotImplementedError end |