Class: Reek::Report::ProgressFormatter::Dots
- Inherits:
-
Base
- Object
- Base
- Reek::Report::ProgressFormatter::Dots
show all
- Defined in:
- lib/reek/report/progress_formatter.rb
Overview
Shows the status of each source as either a dot (.) or an S
Constant Summary
collapse
- NO_WARNINGS_COLOR =
:green
- WARNINGS_COLOR =
:red
Instance Attribute Summary
Attributes inherited from Base
#sources_count
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#display_clean ⇒ Object
52
53
54
|
# File 'lib/reek/report/progress_formatter.rb', line 52
def display_clean
Rainbow('.').color(NO_WARNINGS_COLOR)
end
|
#display_smelly ⇒ Object
56
57
58
|
# File 'lib/reek/report/progress_formatter.rb', line 56
def display_smelly
Rainbow('S').color(WARNINGS_COLOR)
end
|
46
47
48
|
# File 'lib/reek/report/progress_formatter.rb', line 46
def
"\n\n"
end
|
38
39
40
|
# File 'lib/reek/report/progress_formatter.rb', line 38
def
"Inspecting #{sources_count} file(s):\n"
end
|
#progress(examiner) ⇒ Object
42
43
44
|
# File 'lib/reek/report/progress_formatter.rb', line 42
def progress(examiner)
examiner.smelly? ? display_smelly : display_clean
end
|