Class: Kitchen::Directions::BookAnswerKeyContainer::V1

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/directions/book_answer_key_container/v1.rb

Instance Method Summary collapse

Instance Method Details

#bake(book:, solutions_plural:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/kitchen/directions/book_answer_key_container/v1.rb', line 7

def bake(book:, solutions_plural:)
  @composite_element = 'composite-chapter'
  @metadata = book..children_to_keep.copy
  @solutions_or_solution = solutions_plural ? 'solutions' : 'solution'
  @title = I18n.t(:answer_key_title)
  @main_title_tag = 'h1'
  @uuid_key = @solutions_or_solution
  book.body.append(child: render(file: 'eob_answer_key_container.xhtml.erb'))
  book.body.first("div.os-eob.os-#{@solutions_or_solution}-container")
end