module Kitchen::Directions::BakeUnclassifiedNotes
Public Class Methods
bake_note(note:)
click to toggle source
# File lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb, line 14 def self.bake_note(note:) note.wrap_children(class: 'os-note-body') title = note.title&.cut return unless title note.prepend(child: <<~HTML <h3 class="os-title" data-type="title"> <span class="os-title-label" data-type="" id="#{title[:id]}">#{title.children}</span> </h3> HTML ) end
v1(book:)
click to toggle source
# File lib/kitchen/directions/bake_notes/bake_unclassified_notes.rb, line 6 def self.v1(book:) book.notes.each do |note| next unless note.classes.empty? bake_note(note: note) end end