Class: Reek::Report::HeadingFormatter::Base Abstract Private

Inherits:
Object
  • Object
show all
Defined in:
lib/reek/report/heading_formatter.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

This class is abstract.

Override #show_header? to implement a heading formatter.

Base class for heading formatters. Is responsible for formatting the heading emitted for each examiner

Direct Known Subclasses

Quiet, Verbose

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(report_formatter) ⇒ Base

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Base.



13
14
15
# File 'lib/reek/report/heading_formatter.rb', line 13

def initialize(report_formatter)
  @report_formatter = report_formatter
end

Instance Attribute Details

#report_formatterObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'lib/reek/report/heading_formatter.rb', line 11

def report_formatter
  @report_formatter
end

Instance Method Details

#header(examiner) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
20
21
22
23
# File 'lib/reek/report/heading_formatter.rb', line 17

def header(examiner)
  if show_header?(examiner)
    report_formatter.header examiner
  else
    ''
  end
end