module VagrantPlugins::ProviderLibvirt::Util::Collection
Public Class Methods
Source
# File lib/vagrant-libvirt/util/collection.rb, line 11 def self.find_matching(collection, name) collection.each do |single| return single if single.name == name end nil end
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.