Sha256: 66223d4e493bb918c3e0ae721ae7f1affc6653f0ee7e00d0d4b593b4caf4fd9f

Contents?: true

Size: 602 Bytes

Versions: 10

Compression:

Stored size: 602 Bytes

Contents

require_relative 'plugins/linter_gem'
require_relative 'plugins/linter_dir'

module SCSSLint
  # Loads external linter plugins.
  class Plugins
    def initialize(config)
      @config = config
    end

    def load
      all.map(&:load)
    end

  private

    def all
      [plugin_gems, plugin_directories].flatten
    end

    def plugin_gems
      Array(@config['plugin_gems']).map do |gem_name|
        LinterGem.new(gem_name)
      end
    end

    def plugin_directories
      Array(@config['plugin_directories']).map do |directory|
        LinterDir.new(directory)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
scss_lint-0.44.0 lib/scss_lint/plugins.rb
scss_lint-0.43.2 lib/scss_lint/plugins.rb
scss_lint-0.43.1 lib/scss_lint/plugins.rb
scss_lint-0.43.0 lib/scss_lint/plugins.rb
scss_lint-0.42.2 lib/scss_lint/plugins.rb
scss_lint-0.42.1 lib/scss_lint/plugins.rb
scss_lint-0.42.0 lib/scss_lint/plugins.rb
scss_lint-0.41.0 lib/scss_lint/plugins.rb
scss_lint-0.40.1 lib/scss_lint/plugins.rb
scss_lint-0.40.0 lib/scss_lint/plugins.rb