Module: Ifin24::Helpers::Menu

Included in:
Commands::Base, Console
Defined in:
lib/ifin24/helpers/menu.rb

Instance Method Summary collapse

Instance Method Details

#console_menu(exit_prompt) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ifin24/helpers/menu.rb', line 4

def console_menu(exit_prompt)
  catch :exit do
    loop do
      choose do |menu|
        menu.index = :letter
        menu.index_suffix = ") "

        yield menu

        menu.choice(exit_prompt) { throw :exit }
      end
    end
  end
end