Module: SubmenuHelp
- Defined in:
- lib/modules/menus/submenu_help.rb
Constant Summary collapse
- EXIT_SUB_MENU_OPTIONS =
["2"]
Class Method Summary collapse
Class Method Details
.show_choices_sub_menu ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/modules/menus/submenu_help.rb', line 18 def self. Menu.("sub_help") user_input = "" while not EXIT_SUB_MENU_OPTIONS.include? user_input user_input = gets.chomp case user_input when "0" Menu. when "1" puts "Sub-set - ⊆" MenuHelpers.("sub_help") . else MenuHelpers.("sub_help") . end end end |
.show_sub_menu ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/modules/menus/submenu_help.rb', line 7 def self. table = MenuHelpers.terminal_table do |t| t.title = 'Select a number' t.add_row [0, 'Back to main menu'] t.add_row [1, 'Symbols'] t.style = { all_separators: true } end puts table puts '' end |