Sha256: 1645c264cc827f3d8ce4970e678abe4791fa7fc14df865a3fbd190f885fa2737
Contents?: true
Size: 511 Bytes
Versions: 6
Compression:
Stored size: 511 Bytes
Contents
module VagrantPlugins module Libvirt 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
6 entries across 6 versions & 1 rubygems