Sha256: 375062c37d3782d12d18f00097413fcdd400eef9e1f7bdea43e7f3f23568a152

Contents?: true

Size: 513 Bytes

Versions: 11

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

require "core"

module Git
  module Lint
    module Kit
      # Represents an regular expression list which may be used as an analyzer setting.
      class FilterList
        def initialize list = Core::EMPTY_ARRAY
          @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

11 entries across 11 versions & 1 rubygems

Version Path
git-lint-6.2.1 lib/git/lint/kit/filter_list.rb
git-lint-6.2.0 lib/git/lint/kit/filter_list.rb
git-lint-6.1.0 lib/git/lint/kit/filter_list.rb
git-lint-6.0.2 lib/git/lint/kit/filter_list.rb
git-lint-6.0.1 lib/git/lint/kit/filter_list.rb
git-lint-6.0.0 lib/git/lint/kit/filter_list.rb
git-lint-5.3.0 lib/git/lint/kit/filter_list.rb
git-lint-5.2.0 lib/git/lint/kit/filter_list.rb
git-lint-5.1.2 lib/git/lint/kit/filter_list.rb
git-lint-5.1.1 lib/git/lint/kit/filter_list.rb
git-lint-5.1.0 lib/git/lint/kit/filter_list.rb