Class: WritersRoom::Formatters::ScreenplayFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/writers_room/formatters/screenplay_formatter.rb

Overview

Formats a screenplay project into industry-standard-ish output.

Instance Attribute Summary

Attributes inherited from BaseFormatter

#medium, #metadata, #project_path

Instance Method Summary collapse

Methods inherited from BaseFormatter

#export, #format, #initialize

Constructor Details

This class inherits a constructor from WritersRoom::Formatters::BaseFormatter

Instance Method Details

#body_sectionsObject



22
23
24
25
26
27
28
29
30
31
# File 'lib/writers_room/formatters/screenplay_formatter.rb', line 22

def body_sections
  sections = []

  scenes = load_elements("scenes")
  scenes.each do |scene|
    sections << format_scene(scene)
  end

  sections
end

#title_pageObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/writers_room/formatters/screenplay_formatter.rb', line 7

def title_page
  "    \#{@metadata.name.upcase}\n\n\n\n    Written by\n    [Author Name]\n\n\n\n    *Generated: \#{Time.now}*\n  PAGE\nend\n"