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, files) ⇒ Report

Returns a new instance of Report


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

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

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files


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

def files
  @files
end

#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)

12
13
14
# File 'lib/haml_lint/report.rb', line 12

def failed?
  @lints.any?
end