in bash script:
function get_android_devices {
adb devices | awk '{print$1}' | sed 1d`
}
device=$(get_android_devices) #Here you have all android pluged. If you iterate over each line you can launch 1 test per device.
bundle exec cucumber "DEVICE=$(device)" "VAR=something"
And launching in this way you can take those variables (in ruby client) as:
ENV["DEVICE"] or ENV["VAR"]