Class: SCSSLint::Lint

Inherits:
Object
  • Object
show all
Defined in:
lib/scss_lint/lint.rb

Overview

Stores information about a single problem that was detected by a [Linter].

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(linter, filename, location, description, severity = :warning) ⇒ Lint

Returns a new instance of Lint.

Parameters:


11
12
13
14
15
16
17
# File 'lib/scss_lint/lint.rb', line 11

def initialize(linter, filename, location, description, severity = :warning)
  @linter      = linter
  @filename    = filename
  @location    = location
  @description = description
  @severity    = severity
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description


4
5
6
# File 'lib/scss_lint/lint.rb', line 4

def description
  @description
end

#filenameObject (readonly)

Returns the value of attribute filename


4
5
6
# File 'lib/scss_lint/lint.rb', line 4

def filename
  @filename
end

#linterObject (readonly)

Returns the value of attribute linter


4
5
6
# File 'lib/scss_lint/lint.rb', line 4

def linter
  @linter
end

#locationObject (readonly)

Returns the value of attribute location


4
5
6
# File 'lib/scss_lint/lint.rb', line 4

def location
  @location
end

#severityObject (readonly)

Returns the value of attribute severity


4
5
6
# File 'lib/scss_lint/lint.rb', line 4

def severity
  @severity
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)

20
21
22
# File 'lib/scss_lint/lint.rb', line 20

def error?
  severity == :error
end