Sha256: 678e71f0b2fc0a48386e9fe7309dc9d2b1a1b4a664c15ef6194e816bd6a350d2
Contents?: true
Size: 562 Bytes
Versions: 32
Compression:
Stored size: 562 Bytes
Contents
module VagrantPlugins module OVirtProvider 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 return single if single.id == name end nil end end end end end
Version data entries
32 entries across 32 versions & 3 rubygems