Class: Lifer::Builder::TXT

Inherits:
Lifer::Builder show all
Defined in:
lib/lifer/builder/txt.rb

Overview

Builds a text file from a text file.

Note that the collection’s URI strategy is still in play here, so the output path may be different than the input path.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Lifer::Builder

build!, prebuild!

Class Method Details

.execute(root:) ⇒ void

This method returns an undefined value.

Builds text files within the Lifer project’s build directory.

Parameters:

  • root (String)

    The Lifer root directory.



16
17
18
19
20
# File 'lib/lifer/builder/txt.rb', line 16

def execute(root:)
  Dir.chdir Lifer.output_directory do
    new(root:).execute
  end
end

Instance Method Details

#executevoid

This method returns an undefined value.

Builds each entry in each collection, including any requirements (like subdirectories) those entries have.



27
28
29
30
31
32
# File 'lib/lifer/builder/txt.rb', line 27

def execute
  Lifer.collections(without_selections: true).each do |collection|
    generate_output_directories_for collection
    generate_output_entries_for collection
  end
end