in ruby you can often read it how it is written. So you can read
Map items to response of method GetDeviceName with argument item and reject all elements that is empty.