# frozen_string_literal: true module Kitchen::Directions::MoveSolutionsToAnswerKey class V1 def bake(chapter:, metadata_source:, strategy:, append_to:, strategy_options: {}, solutions_plural: true) strategy = case strategy when :calculus Strategies::Calculus.new when :uphysics Strategies::UPhysics.new when :precalculus Strategies::Precalculus.new when :default Strategies::Default.new(strategy_options) else raise 'No such strategy' end solutions_or_solution = solutions_plural ? 'solutions' : 'solution' append_to.append(child: <<~HTML