Ruby can be more elegant as you actually want to map ids to names and filter out empty names. So I can write it as
```
def GetDeviceNames( items)
  items.map { |item| GetDeviceName(item) }.reject(&:empty?)
end
```