From 10599ab2e789ffb93a19f6aa3c100f533c460315 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 29 Oct 2023 11:32:06 -0400 Subject: generate, show, solve puzzles --- lib/tasks/wittle_tasks.rake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/tasks') diff --git a/lib/tasks/wittle_tasks.rake b/lib/tasks/wittle_tasks.rake index 854e5c9..debf249 100644 --- a/lib/tasks/wittle_tasks.rake +++ b/lib/tasks/wittle_tasks.rake @@ -1,4 +1,7 @@ -# desc "Explaining what the task does" -# task :wittle do -# # Task goes here -# end +namespace :wittle do + desc "Generate new puzzles for the day" + task :generate_puzzles => :environment do + Wittle::Puzzle.create(data: WittleGenerator.new.generate_easy, category: :normal) + Wittle::Puzzle.create(data: WittleGenerator.new.generate_medium, category: :hard) + end +end -- cgit 1.4.1