Module: SCSSLint::LinterRegistry

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.lintersObject (readonly)

Returns the value of attribute linters.



8
9
10
# File 'lib/scss_lint/linter_registry.rb', line 8

def linters
  @linters
end

Class Method Details

.extract_linters_from(linter_names) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/scss_lint/linter_registry.rb', line 14

def extract_linters_from(linter_names)
  linter_names.map do |linter_name|
    begin
      Linter.const_get(linter_name)
    rescue NameError
      raise NoSuchLinter.new("Linter #{linter_name} does not exist")
    end
  end
end

.included(base) ⇒ Object



10
11
12
# File 'lib/scss_lint/linter_registry.rb', line 10

def included(base)
  @linters << base
end