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(filename, line, description, severity = :warning) ⇒ Lint


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

def initialize(filename, line, description, severity = :warning)
  @filename    = filename
  @line        = line
  @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

#lineObject (readonly)

Returns the value of attribute line


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

def line
  @line
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


18
19
20
# File 'lib/scss_lint/lint.rb', line 18

def error?
  severity == :error
end