lib/slim_lint/report.rb in slim_lint-0.2.0 vs lib/slim_lint/report.rb in slim_lint-0.3.0
- old
+ new
@@ -1,10 +1,17 @@
module SlimLint
# Contains information about all lints detected during a scan.
class Report
+ # List of lints that were found.
attr_accessor :lints
+
+ # List of files that were linted.
attr_reader :files
+ # Creates a report.
+ #
+ # @param lints [Array<SlimLint::Lint>] lints that were found
+ # @param files [Array<String>] files that were linted
def initialize(lints, files)
@lints = lints.sort_by { |l| [l.filename, l.line] }
@files = files
end