src/classes.rb
#Finds any existing noteboard files and displays a selection menu
Finds any existing noteboard files and displays a selection menu
Finds any existing noteboard files and displays a selection menu
def noteboard_menu
    @file_arr = Dir.glob("*csv")
    @file_menu = TTY::Prompt.new
    @file_menu.select("Select an existing noteboard") do |menu|
        for file in @file_arr do
        menu.choice "#{file}", -> {Noteboard.display_noteboard(file)}
        end
        menu.choice "Delete a noteboard", -> {delete_noteboard}
        menu.choice "Back", -> {StartMenu.new}
    end
end
def noteboard_menu @file_arr = Dir . glob ( "*csv" ) @file_menu = TTY :: Prompt . new @file_menu . select ( "Select an existing noteboard" ) do | menu | for file in @file_arr do menu . choice "#{file}" , -> { Noteboard . display_noteboard ( file ) } end menu . choice "Delete a noteboard" , -> { delete_noteboard } menu . choice "Back" , -> { StartMenu . new } end end
Finds any existing noteboard files and displays a selection menu
Finds any existing noteboard files and displays a selection menu