Class: Kitchen::Directions::BakeAppendixFeatureTitles::V1
- Defined in:
- lib/kitchen/directions/bake_appendix_feature-titles/v1.rb
Instance Method Summary collapse
Instance Method Details
#bake(section:, selector:) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/kitchen/directions/bake_appendix_feature-titles/v1.rb', line 5 def bake(section:, selector:) # Remoe feature section old title if exists section.first('[data-type="title"]')&.trash title = <<~HTML <h2 data-type="title"> <span class="os-text">#{I18n.t(:"appendix_sections.#{selector}")}</span> </h2> HTML section.prepend(child: title) end |