Sha256: 805f270e231e1b4533dab8e18d08bc42e168ce9235604c4e86a1e02ee138ae1f

Contents?: true

Size: 289 Bytes

Versions: 3

Compression:

Stored size: 289 Bytes

Contents

module Signore
  Tags = Struct.new(:forbidden, :required) do
    def initialize(forbidden: [], required: [])
      super forbidden, required
    end

    def match?(sig_tags)
      sig_tags ||= []
      (required & sig_tags) == required and (forbidden & sig_tags).empty?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
signore-0.4.2 lib/signore/tags.rb
signore-0.4.1 lib/signore/tags.rb
signore-0.4.0 lib/signore/tags.rb