Sha256: d3c3920a2647b59c3e5c2647a8bfa1b0cb179d0daf050cfab6d8fa05cca3d23c
Contents?: true
Size: 576 Bytes
Versions: 30
Compression:
Stored size: 576 Bytes
Contents
# frozen_string_literal: true @solution2 = Kitchen::BookRecipe.new do |doc| # ^ # | # # BookRecipe gives us `doc.book` and `book.chapters` to make the code cleaner # # | | # v v doc.book.chapters.each do |chapter| movers = chapter.search('.will-move').cut movers.each { |mover| mover.name = 'section' } chapter.append(child: <<~HTML <div class="eoc"> <div class="os-title">End of Chapter Collations</div> #{movers.paste} </div> HTML ) end end
Version data entries
30 entries across 30 versions & 1 rubygems