Module: Kitchen::Directions::CompositePageContainer

Defined in:
lib/kitchen/directions/composite_page_container/v1.rb,
lib/kitchen/directions/composite_page_container/main.rb

Defined Under Namespace

Classes: V1

Class Method Summary collapse

Class Method Details

.v1(container_key:, uuid_key:, metadata_source:, content:, append_to:) ⇒ ElementBase

Creates a wrapper for the given content & appends it to the given element

Parameters:

  • container_key (String)

    Appended to ‘eoc.’ to form the I18n key for the container title; also used as part of a class on the container.

  • uuid_key (String)

    the uuid key for the wrapper class, e.g. ‘’.summary’‘

  • metadata_source (MetadataElement)

    metadata for the book

  • content (String)

    the content to be contained by the wrapper

  • append_to (ElementBase)

    the element to be appended, usually either a ‘ChapterElement` or a `CompositeChapterElement`

Returns:

  • (ElementBase)

    the append_to element with container appended



15
16
17
18
19
20
21
22
23
24
# File 'lib/kitchen/directions/composite_page_container/main.rb', line 15

def self.v1(container_key:, uuid_key:, metadata_source:, content:,
            append_to:)
  V1.new.bake(
    container_key: container_key,
    uuid_key: uuid_key,
    metadata_source: ,
    content: content,
    append_to: append_to
  )
end