Actually I can’t understand what the cause of my problem is, I start the loop , everything works correctly, a certain list is displayed in the terminal, but as soon as I get it into the method, everything ends there, there are no errors when starting, but there is no list from the cycle loop , tell me where to dig?
An example that works:
loop do puts "Hello World" break end An example of what doesn't work, but needs to be done:
def menu loop do puts %Q( 1. Посчитать цену молока ) puts "Введите нужное число из меню:" input = gets.chomp case input when 1 show_moloko end end end def show_moloko тут вычисляем end
menufunction? - Igormenunot called anywhere, where does the output in the terminal come from? Writemenu()whereloopused to be. - Igor