Class: HamlLint::Report
- Inherits:
-
Object
- Object
- HamlLint::Report
- Defined in:
- lib/haml_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.
14 15 16 17 |
# File 'lib/haml_lint/report.rb', line 14 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.
8 9 10 |
# File 'lib/haml_lint/report.rb', line 8 def files @files end |
#lints ⇒ Object
List of lints that were found.
5 6 7 |
# File 'lib/haml_lint/report.rb', line 5 def lints @lints end |
Instance Method Details
#failed? ⇒ Boolean
19 20 21 |
# File 'lib/haml_lint/report.rb', line 19 def failed? @lints.any? end |