Sha256: 41792695f5c3e81a59e10b1cbb196386d7f1978986777f0b0298e560fe3545be

Contents?: true

Size: 559 Bytes

Versions: 72

Compression:

Stored size: 559 Bytes

Contents

module SCSSLint
  class NoSuchLinter < StandardError; end

  # Stores all linters available to the application.
  module LinterRegistry
    @linters = []

    class << self
      attr_reader :linters

      def included(base)
        @linters << base
      end

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

Version data entries

72 entries across 72 versions & 3 rubygems

Version Path
scss-lint-0.33.0 lib/scss_lint/linter_registry.rb
scss-lint-0.32.0 lib/scss_lint/linter_registry.rb
scss-lint-0.31.0 lib/scss_lint/linter_registry.rb
scss-lint-0.30.0 lib/scss_lint/linter_registry.rb
scss-lint-0.29.0 lib/scss_lint/linter_registry.rb
scss-lint-0.28.0 lib/scss_lint/linter_registry.rb
scss-lint-0.27.0 lib/scss_lint/linter_registry.rb
scss-lint-0.26.2 lib/scss_lint/linter_registry.rb
scss-lint-0.26.1 lib/scss_lint/linter_registry.rb
scss-lint-0.26.0 lib/scss_lint/linter_registry.rb
scss-lint-0.25.1 lib/scss_lint/linter_registry.rb
scss-lint-0.25.0 lib/scss_lint/linter_registry.rb
scss-lint-0.24.1 lib/scss_lint/linter_registry.rb
scss-lint-0.24.0 lib/scss_lint/linter_registry.rb
scss-lint-0.23.1 lib/scss_lint/linter_registry.rb
scss-lint-0.23.0 lib/scss_lint/linter_registry.rb
scss-lint-0.22.0 lib/scss_lint/linter_registry.rb
scss-lint-0.21.0 lib/scss_lint/linter_registry.rb
scss-lint-0.20.3 lib/scss_lint/linter_registry.rb
scss-lint-0.20.2 lib/scss_lint/linter_registry.rb