class AocCli::Solve::Respond::Correct

Public Instance Methods

react() click to toggle source
# File lib/aoc_cli/solve.rb, line 47
def react
        Database.correct(attempt:attempt)
        Year.refresh
        Day.refresh(files:[:Puzzle])
end
respond() click to toggle source
# File lib/aoc_cli/solve.rb, line 52
                                def respond
                                        puts <<~response
                                        #{"Correct!".bold.green} #{ 
                                        case attempt.part
                                        when "1" then "Downloading part two..."
                                        when "2" then "This day is now complete!".green
                                        end }
                                        response
                                        self
                                end