Sha256: 593ab64daf203b2b201c10111d2c0002a2834378b10e85ecdaf2c7f508a4f33d
Contents?: true
Size: 997 Bytes
Versions: 6
Compression:
Stored size: 997 Bytes
Contents
# frozen_string_literal: true module Kitchen::Directions module BakeNumberedNotes class V2 def bake(book:, classes:) classes.each do |klass| book.chapters.pages.notes("$.#{klass}").each do |note| note.wrap_children(class: 'os-note-body') note_count = note.count_in(:page) note.prepend(child: <<~HTML <h3 class="os-title"> <span class="os-title-label">#{note.autogenerated_title}</span> <span class="os-number">##{note_count}</span> </h3> HTML ) note.exercises.each do |exercise| BakeNumberedNotes.bake_note_exercise(note: note, exercise: exercise, divider: '. ') end note.injected_questions.each do |question| BakeNumberedNotes.bake_note_injected_question(note: note, question: question) end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems