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.60.0 lib/scss_lint/linter_registry.rb
scss_lint-0.59.0 lib/scss_lint/linter_registry.rb
scss_lint-0.58.0 lib/scss_lint/linter_registry.rb
scss_lint-0.57.1 lib/scss_lint/linter_registry.rb
scss_lint-0.57.0 lib/scss_lint/linter_registry.rb
scss_lint-0.56.0 lib/scss_lint/linter_registry.rb
scss_lint-0.55.0 lib/scss_lint/linter_registry.rb
scss_lint-0.54.0 lib/scss_lint/linter_registry.rb
scss_lint-0.53.0 lib/scss_lint/linter_registry.rb
scss_lint-0.52.0 lib/scss_lint/linter_registry.rb
scss_lint-0.51.0 lib/scss_lint/linter_registry.rb
scss_lint-0.50.3 lib/scss_lint/linter_registry.rb
scss_lint-0.50.2 lib/scss_lint/linter_registry.rb
scss_lint-0.50.1 lib/scss_lint/linter_registry.rb
scss_lint-0.50.0 lib/scss_lint/linter_registry.rb
scss_lint-0.49.0 lib/scss_lint/linter_registry.rb
scss_lint-0.48.0 lib/scss_lint/linter_registry.rb
scss_lint-0.47.1 lib/scss_lint/linter_registry.rb
scss_lint-0.47.0 lib/scss_lint/linter_registry.rb
scss_lint-0.46.0 lib/scss_lint/linter_registry.rb