Class: DatarocketsStyle::Formatter::TodoListFormatter::ReportSummary
- Inherits:
-
Object
- Object
- DatarocketsStyle::Formatter::TodoListFormatter::ReportSummary
- Defined in:
- lib/datarockets_style/formatter/todo_list_formatter/report_summary.rb
Overview
Get file of pairs: file path and cop name - and prepare report for ToDo list formatter.
Example of result:
LineLength
Exclude:
- "really/bad/file.rb" # 100500
- "almost/ok.rb" # 1
Defined Under Namespace
Classes: FileGroup, OffenseGroup
Instance Attribute Summary collapse
-
#offense_list ⇒ Object
readonly
Returns the value of attribute offense_list.
Instance Method Summary collapse
- #call(output) ⇒ Object
-
#initialize(offense_list) ⇒ ReportSummary
constructor
A new instance of ReportSummary.
Constructor Details
#initialize(offense_list) ⇒ ReportSummary
Returns a new instance of ReportSummary.
40 41 42 |
# File 'lib/datarockets_style/formatter/todo_list_formatter/report_summary.rb', line 40 def initialize(offense_list) @offense_list = offense_list end |
Instance Attribute Details
#offense_list ⇒ Object (readonly)
Returns the value of attribute offense_list.
15 16 17 |
# File 'lib/datarockets_style/formatter/todo_list_formatter/report_summary.rb', line 15 def offense_list @offense_list end |
Instance Method Details
#call(output) ⇒ Object
44 45 46 |
# File 'lib/datarockets_style/formatter/todo_list_formatter/report_summary.rb', line 44 def call(output) offense_groups.sort_by(&:cop_name).each { |group| group.print(output) } end |