lib/terminal-menu.rb
def print_options
      @options.each_with_index do |option, i|
        if i == @options.length - 1 # last option AKA exit
          print_delimiter
          print("#{option[:label].upcase}", inverted: i == @selected_index)
        else
          print(">> #{option[:label].upcase}", inverted: i == @selected_index)
        end
      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 print_options
      @options.each_with_index do |option, i|
        if i == @options.length - 1 
          print_delimiter
          print("#{option[:label].upcase}", inverted: i == @selected_index)
        else
          print(">> #{option[:label].upcase}", inverted: i == @selected_index)
        end
      end
    end
def print_options @options . each_with_index do | option , i | if i == @options . length - 1 print_delimiter print ( "#{option[:label].upcase}" , inverted : i == @selected_index ) else print ( ">> #{option[:label].upcase}" , inverted : i == @selected_index ) end end end
Public: Initializes new TerminalMenu instance.
Public : Initializes new TerminalMenu instance .
# last option AKA exit