Sha256: 1c766371ff8a2c8bda70ccae18ec8c0438776cb4eb1c190e8c1beabbcc9fc1ec
Contents?: true
Size: 547 Bytes
Versions: 23
Compression:
Stored size: 547 Bytes
Contents
# frozen_string_literal: true module VagrantPlugins module ProviderLibvirt module Util module Collection # This method finds a matching _thing_ in a collection of # _things_. This works matching if the ID or NAME equals to # `name`. Or, if `name` is a regexp, a partial match is chosen # as well. def self.find_matching(collection, name) collection.each do |single| return single if single.name == name end nil end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems