Skip to content

Commit

Permalink
Add documentation for PDF::Entry
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Apr 1, 2017
1 parent 551bde4 commit 3743e13
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
11 changes: 11 additions & 0 deletions lib/resume/pdf/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@

module Resume
module PDF
# Module representing the PDF document itself.
#
# @author Paul Fioravanti
module Document
module_function

# Generates the PDF document.
#
# @param resume [Hash]
# Contains all content to be used in generating the resume.
# @param title [String]
# The resume title to use in the document's metadata.
# @param filename [String]
# The name of the filename to be generated.
def generate(resume, title, filename)
require "prawn"
require "prawn/table"
Expand Down
9 changes: 9 additions & 0 deletions lib/resume/pdf/entry/company_logo.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
module Resume
module PDF
module Entry
# Module for generating a company logo for an entry.
#
# @author Paul Fioravanti
module CompanyLogo
module_function

# Generates a company logo for an entry.
#
# @param pdf [Prawn::Document]
# The PDF to on which to apply the company logo.
# @param logo [Hash]
# Presentation information about the logo.
def generate(pdf, logo)
pdf.move_up logo[:y_start]
pdf.bounding_box(
Expand Down
9 changes: 9 additions & 0 deletions lib/resume/pdf/entry/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@
module Resume
module PDF
module Entry
# Module for generating the content section of an entry.
#
# @author Paul Fioravanti
module Content
module_function

# Generates content for a job history entry.
#
# @param pdf [Prawn::Document]
# The PDF to on which to apply the content.
# @param entry [Hash]
# Presentation information about the job history entry.
def generate(pdf, entry)
top_padding, logo, summary =
entry.values_at(:top_padding, :logo, :summary)
Expand Down
9 changes: 9 additions & 0 deletions lib/resume/pdf/entry/header.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
module Resume
module PDF
module Entry
# Module for generating a header for an entry.
#
# @author Paul Fioravanti
module Header
module_function

# Generates the header section for a job history entry.
#
# @param pdf [Prawn::Document]
# The PDF to on which to apply the header.
# @param entry [Hash]
# Presentation information about the job history entry.
def generate(pdf, entry)
# Different rendering behaviour needed depending on whether
# the header is being drawn from left to right on the page
Expand Down
4 changes: 2 additions & 2 deletions lib/resume/pdf/entry/heading.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ module PDF
#
# @author Paul Fioravanti
module Entry
# Module for generating the header section of the PDF.
# Module for generating the header section of an entry.
#
# @author Paul Fioravanti
module Heading
module_function

# Generates the PDF heading section.
# Generates the heading for a job history entry.
#
# @param pdf [Prawn::Document]
# The PDF to on which to generate the heading.
Expand Down

0 comments on commit 3743e13

Please sign in to comment.