lib/terminal-menu.rb
def go_down
      if @selected_index == @options.length - 1
        @selected_index = 0
      else
        @selected_index += 1
      end
    end
# Public: Initializes new TerminalMenu instance.
#
# block - Optional block that will get called with label once some option
#         is selected
#
# Options:
#
#   title - The title of this menu (default: '')
#   description - The description of this menu (default: '')
#   width - The width of this menu in chars (default: 80)
#   fg - Foreground color of this menu (default: 'white')
#   bg - Background color of this menu (default: 'black')
#   stdin - Input IO instance (default: STDIN)
#   stdout - Output IO instance (default: STDOUT)
Initializes new TerminalMenu instance.
block - Optional block that will get called with label once some option
is selected




Initializes new TerminalMenu instance . block - Optional block that will get called with label once some option is selected
def go_down
      if @selected_index == @options.length - 1
        @selected_index = 0
      else
        @selected_index += 1
      end
    end
def go_down if @selected_index == @options . length - 1 @selected_index = 0 else @selected_index += 1 end end
Public: Initializes new TerminalMenu instance.
Public : Initializes new TerminalMenu instance .