Sha256: d4e5979a9c711eebb71a4ac9e9de2691c57cdd4ccec7956cbead8c7d4b8f360b

Contents?: true

Size: 543 Bytes

Versions: 11

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module Kit
      class FilterList
        # Represents an regular expression list which may be used as an analyzer setting.
        def initialize list = []
          @list = Array list
        end

        def to_hint
          to_regexp.map(&:inspect).join ", "
        end

        def to_regexp
          list.map { |item| Regexp.new item }
        end

        def empty?
          list.empty?
        end

        private

        attr_reader :list
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
git-lint-2.2.1 lib/git/lint/kit/filter_list.rb
git-lint-2.2.0 lib/git/lint/kit/filter_list.rb
git-lint-2.1.0 lib/git/lint/kit/filter_list.rb
git-lint-2.0.0 lib/git/lint/kit/filter_list.rb
git-lint-1.4.0 lib/git/lint/kit/filter_list.rb
git-lint-1.3.0 lib/git/lint/kit/filter_list.rb
git-lint-1.2.0 lib/git/lint/kit/filter_list.rb
git-lint-1.1.1 lib/git/lint/kit/filter_list.rb
git-lint-1.1.0 lib/git/lint/kit/filter_list.rb
git-lint-1.0.1 lib/git/lint/kit/filter_list.rb
git-lint-1.0.0 lib/git/lint/kit/filter_list.rb