Class: HamlLint::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/haml_lint/report.rb

Overview

Contains information about all lints detected during a scan.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lints) ⇒ Report

Returns a new instance of Report.


6
7
8
# File 'lib/haml_lint/report.rb', line 6

def initialize(lints)
  @lints = lints.sort_by { |l| [l.filename, l.line] }
end

Instance Attribute Details

#lintsObject

Returns the value of attribute lints


4
5
6
# File 'lib/haml_lint/report.rb', line 4

def lints
  @lints
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)

10
11
12
# File 'lib/haml_lint/report.rb', line 10

def failed?
  @lints.any?
end