Sha256: a4ed1c390445b24c60184b310b09721a1639c8e76c45864a06e317f050b13862
Contents?: true
Size: 545 Bytes
Versions: 12
Compression:
Stored size: 545 Bytes
Contents
# frozen_string_literal: true module Kitchen::Directions::BakeUnitPageTitle class V1 def bake(book:) book.units.each do |unit| unit.element_children.only(Kitchen::PageElement).each do |page| compose_unit_page_title(page: page) end end end def compose_unit_page_title(page:) title = page.title title.name = 'h2' title.replace_children(with: <<~HTML <span data-type="" itemprop="" class="os-text">#{title.text}</span> HTML ) end end end
Version data entries
12 entries across 12 versions & 1 rubygems