Sha256: 41cf9588b631b0e79a28248d4c4b42a40b2495e947cb6e8df9a27642236258d2

Contents?: true

Size: 770 Bytes

Versions: 14

Compression:

Stored size: 770 Bytes

Contents

# frozen_string_literal: true

module Kitchen::Directions::BakeChapterKeyConcepts
  class V1
    def bake(chapter:, metadata_source:, append_to:, uuid_prefix:)
      Kitchen::Directions::MoveCustomSectionToEocContainer.v1(
        chapter: chapter,
        metadata_source: metadata_source,
        container_key: 'key-concepts',
        uuid_key: "#{uuid_prefix}key-concepts",
        section_selector: 'section.key-concepts',
        append_to: append_to || chapter,
        wrap_section: true, wrap_content: true
      ) do |section|
        Kitchen::Directions::RemoveSectionTitle.v1(section: section)
        title = Kitchen::Directions::EocSectionTitleLinkSnippet.v1(page: section.ancestor(:page))
        section.prepend(child: title)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
openstax_kitchen-19.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-18.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-17.1.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-17.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-16.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-15.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-14.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-13.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-12.2.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-12.1.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-12.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-11.2.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-11.1.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb
openstax_kitchen-11.0.0 lib/kitchen/directions/bake_chapter_key_concepts/v1.rb