Sha256: 187d9f28fabee68027db6c1c77dd75e00fea00e678d51e89b7dcb415fc6aa090
Contents?: true
Size: 302 Bytes
Versions: 3
Compression:
Stored size: 302 Bytes
Contents
require_relative 'signature' require_relative 'tags' module Signore module SigFinder module_function def find(sigs, random: Random.new, tags: Tags.new) shuffled = sigs.shuffle(random: random) shuffled.find(-> { Signature.new }) { |sig| tags.match?(sig.tags) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
signore-0.7.0 | lib/signore/sig_finder.rb |
signore-0.4.2 | lib/signore/sig_finder.rb |
signore-0.4.1 | lib/signore/sig_finder.rb |