# frozen_string_literal: true module Kitchen::Directions::MoveSolutionsToAnswerKey class V1 def bake(chapter:, metadata_source:, strategy:, append_to:) strategy = case strategy when :calculus Strategies::Calculus when :uphysics Strategies::UPhysics when :american_government Strategies::AmericanGovernment else raise 'No such strategy' end append_to.append(child: <<~HTML

#{I18n.t(:chapter)} #{chapter.count_in(:book)}

#{I18n.t(:chapter)} #{chapter.count_in(:book)}

#{metadata_source.children_to_keep.copy.paste}
HTML ) strategy.new.bake(chapter: chapter, append_to: append_to.last_element) end end end