Class: SCSSLint::Reporter

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

Overview

Responsible for displaying lints to the user in some format.

Defined Under Namespace

Classes: CleanFilesReporter, ConfigReporter, DefaultReporter, FilesReporter, JSONReporter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lints, files) ⇒ Reporter

Returns a new instance of Reporter.

Parameters:

  • lints (List<Lint>)

    a list of Lints sorted by file and line number

  • files (List<String>)

    a list of the files that were linted



12
13
14
15
# File 'lib/scss_lint/reporter.rb', line 12

def initialize(lints, files)
  @lints = lints
  @files = files
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



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

def files
  @files
end

#lintsObject (readonly)

Returns the value of attribute lints.



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

def lints
  @lints
end

Class Method Details

.descendantsObject



6
7
8
# File 'lib/scss_lint/reporter.rb', line 6

def self.descendants
  ObjectSpace.each_object(Class).select { |klass| klass < self }
end

Instance Method Details

#report_lintsObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/scss_lint/reporter.rb', line 17

def report_lints
  raise NotImplementedError, 'You must implement report_lints'
end