Class: SlimLint::Report
- Inherits:
-
Object
- Object
- SlimLint::Report
- Defined in:
- lib/slim_lint/report.rb
Overview
Contains information about all lints detected during a scan.
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
List of files that were linted.
-
#lints ⇒ Object
List of lints that were found.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(lints, files) ⇒ Report
constructor
Creates a report.
Constructor Details
#initialize(lints, files) ⇒ Report
Creates a report.
16 17 18 19 |
# File 'lib/slim_lint/report.rb', line 16 def initialize(lints, files) @lints = lints.sort_by { |l| [l.filename, l.line] } @files = files end |
Instance Attribute Details
#files ⇒ Object (readonly)
List of files that were linted.
10 11 12 |
# File 'lib/slim_lint/report.rb', line 10 def files @files end |
#lints ⇒ Object
List of lints that were found.
7 8 9 |
# File 'lib/slim_lint/report.rb', line 7 def lints @lints end |
Instance Method Details
#failed? ⇒ Boolean
21 22 23 |
# File 'lib/slim_lint/report.rb', line 21 def failed? @lints.any? end |