Module: Kitchen::Directions::BakeChapterIntroductions

Defined in:
lib/kitchen/directions/bake_chapter_introductions/v1.rb,
lib/kitchen/directions/bake_chapter_introductions/v2.rb,
lib/kitchen/directions/bake_chapter_introductions/main.rb,
lib/kitchen/directions/bake_chapter_introductions/bake_chapter_outline.rb,
lib/kitchen/directions/bake_chapter_introductions/bake_chapter_objectives.rb

Defined Under Namespace

Classes: BakeChapterObjectives, BakeChapterOutline, V1, V2

Class Method Summary collapse

Class Method Details

.bake_chapter_objectives(chapter:, strategy:) ⇒ Object



24
25
26
27
28
29
# File 'lib/kitchen/directions/bake_chapter_introductions/main.rb', line 24

def self.bake_chapter_objectives(chapter:, strategy:)
  BakeChapterObjectives.new.bake(
    chapter: chapter,
    strategy: strategy
  )
end

.bake_chapter_outline(chapter_objectives_html:) ⇒ Object



31
32
33
34
35
# File 'lib/kitchen/directions/bake_chapter_introductions/main.rb', line 31

def self.bake_chapter_outline(chapter_objectives_html:)
  BakeChapterOutline.new.bake(
    chapter_objectives_html: chapter_objectives_html
  )
end

.v1(book:) ⇒ Object



6
7
8
9
10
# File 'lib/kitchen/directions/bake_chapter_introductions/main.rb', line 6

def self.v1(book:)
  V1.new.bake(
    book: book
  )
end

.v1_update_selectors(something_with_selectors) ⇒ Object



37
38
39
40
# File 'lib/kitchen/directions/bake_chapter_introductions/main.rb', line 37

def self.v1_update_selectors(something_with_selectors)
  something_with_selectors.selectors.title_in_introduction_page =
    ".intro-text > [data-type='document-title']"
end

.v2(book:, strategy_options: { strategy: :default, bake_chapter_outline: false, introduction_order: :v1 }) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/kitchen/directions/bake_chapter_introductions/main.rb', line 12

def self.v2(
  book:,
  strategy_options: {
    strategy: :default, bake_chapter_outline: false, introduction_order: :v1
  }
)
  V2.new.bake(
    book: book,
    strategy_options: strategy_options
  )
end