module MainHelper

This module provides helper methods to display informative messages to the user

Public Instance Methods

confirm_deletion_message(idx, todo) click to toggle source
# File lib/helpers/main_helper.rb, line 18
def confirm_deletion_message(idx, todo)
  "Permanently delete task #{idx + 1} #{todo.description}?  (yes/no)"
end
display_created_task_message(idx) click to toggle source
# File lib/helpers/main_helper.rb, line 14
def display_created_task_message(idx)
  puts "Created task #{idx}"
end
display_description_needed_message() click to toggle source
# File lib/helpers/main_helper.rb, line 6
def display_description_needed_message
  puts 'You must provide a description for the task'
end
display_something_went_wrong_message(msg) click to toggle source
# File lib/helpers/main_helper.rb, line 10
def display_something_went_wrong_message(msg)
  puts "Sorry, something went wrong: #{msg}"
end
print_successfull_deletion_message() click to toggle source