I have a function that presents the user a combo-box.
def select_interface(interfaces)
  list_box :items => interfaces do |list|
    interface = list.text
  end
  ### ideally should wait until interface has a value then: ###
  return interface
end
The rest of the program depends on the selection from this combo-box.
I would like to find a way to make ruby wait for the input from the combo-box and then carry executing the rest of the code.
There is a similar function in shoes called ask that will wait for the input of the user.
interface =  ask("write your interface here")
How can I implement this "wait until the variable has a value" function in Ruby/shoes?