Sha256: 6712a8841b66c24bf52eaa597100e4841cc80468124571aa28ef7fc9c3b78000
Contents?: true
Size: 799 Bytes
Versions: 10
Compression:
Stored size: 799 Bytes
Contents
# frozen_string_literal: true module Kitchen::Directions::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| Kitchen::Directions::BakeNumberedNotes.bake_note_exercise(note: note, exercise: exercise, divider: '. ') end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems