Sha256: bb027d7bb8fa416cf376bb40870ca65d60cecda55230c9b1fefb6cda2f50832d

Contents?: true

Size: 482 Bytes

Versions: 17

Compression:

Stored size: 482 Bytes

Contents

# frozen_string_literal: true

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

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

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

        def empty? = list.empty?

        private

        attr_reader :list
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
git-lint-5.0.0 lib/git/lint/kit/filter_list.rb
git-lint-4.6.0 lib/git/lint/kit/filter_list.rb
git-lint-4.5.0 lib/git/lint/kit/filter_list.rb
git-lint-4.4.0 lib/git/lint/kit/filter_list.rb
git-lint-4.3.0 lib/git/lint/kit/filter_list.rb
git-lint-4.2.0 lib/git/lint/kit/filter_list.rb
git-lint-4.1.0 lib/git/lint/kit/filter_list.rb
git-lint-4.0.1 lib/git/lint/kit/filter_list.rb
git-lint-4.0.0 lib/git/lint/kit/filter_list.rb
git-lint-3.3.2 lib/git/lint/kit/filter_list.rb
git-lint-3.3.1 lib/git/lint/kit/filter_list.rb
git-lint-3.3.0 lib/git/lint/kit/filter_list.rb
git-lint-3.2.0 lib/git/lint/kit/filter_list.rb
git-lint-3.1.0 lib/git/lint/kit/filter_list.rb
git-lint-3.0.2 lib/git/lint/kit/filter_list.rb
git-lint-3.0.1 lib/git/lint/kit/filter_list.rb
git-lint-3.0.0 lib/git/lint/kit/filter_list.rb