Method: Lab::Controllers::VmController#find_by_tag

Defined in:
lib/lab/vm_controller.rb

#find_by_tag(search) ⇒ Object



74
75
76
77
78
79
80
81
# File 'lib/lab/vm_controller.rb', line 74

def find_by_tag(search)
  @vms.each do |vm|
    vm.tags.each do |tag| 
      return vm if tag == search
    end
  end
  return nil
end