Sha256: 2d83bf830e80e7d053465f5197c6aaca3dd6da04bcd100e66151384d8ba22d2b
Contents?: true
Size: 352 Bytes
Versions: 1
Compression:
Stored size: 352 Bytes
Contents
module Signore Tags = Struct.new(:forbidden, :required) do def initialize(forbidden: [], required: []) super forbidden, required end def match?(sig_tags) (required & sig_tags) == required and (forbidden & sig_tags).empty? end def to_s (required + forbidden.map { |tag| "~#{tag}" }).join(' ') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
signore-0.7.0 | lib/signore/tags.rb |