Sha256: 8fe8a9c7278edb35ff2b538d6096fdf276c60076f8be6199aab2945bdb2517dc

Contents?: true

Size: 291 Bytes

Versions: 1

Compression:

Stored size: 291 Bytes

Contents

require_relative 'signature'
require_relative 'tags'

module Signore
  module SigFinder
    module_function

    def find(sigs, random: Random.new, tags: Tags.new)
      found = sigs.shuffle(random: random).find { |sig| tags.match?(sig.tags) }
      found or Signature.new
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
signore-0.4.0 lib/signore/sig_finder.rb