Class: Kitchen::Directions::ChapterReviewContainer::V1

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

Instance Method Summary collapse

Instance Method Details

#bake(chapter:, metadata_source:, klass: 'chapter-review') ⇒ Object



7
8
9
10
11
12
13
# File 'lib/kitchen/directions/chapter_review_container/v1.rb', line 7

def bake(chapter:, metadata_source:, klass: 'chapter-review')
  @metadata = .children_to_keep.copy
  @klass = klass
  @title = I18n.t(:"eoc.#{klass}")
  chapter.append(child: render(file: 'chapter_review.xhtml.erb'))
  chapter.element_children[-1]
end