you can write it
```
vendor_ids = pci_out.split(/^$/).reduce([]) do |ids,pci_device|
  if pci_device.match /^Class:\s+0300$/
    if pci_device.match /^Vendor:\s+(\d+)/
       ids << $1
    end
  end
  ids
end
```