Skip to content

Commit

Permalink
Start on some configuration for the PDF module
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Apr 1, 2017
1 parent 2289146 commit 551bde4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
12 changes: 12 additions & 0 deletions lib/resume/pdf/entry/heading.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
module Resume
module PDF
# Namespace for generating PDF sections for job history entry.
#
# @author Paul Fioravanti
module Entry
# Module for generating the header section of the PDF.
#
# @author Paul Fioravanti
module Heading
module_function

# Generates the PDF heading section.
#
# @param pdf [Prawn::Document]
# The PDF to on which to generate the heading.
# @param heading [Hash]
# Presentation information about the heading.
def generate(pdf, heading)
pdf.move_down(heading[:top_padding])
pdf.formatted_text([text_properties(heading)])
Expand Down
4 changes: 2 additions & 2 deletions lib/resume/pdf/font.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module Font

# Configures the PDF font.
#
# @param pdf [Prawn::Document] The PDF to configure the font for.
# @param font [Hash] Determines which font is needed for the PDF.
# @param pdf [Prawn::Document] The PDF on which to configure the font.
# @param font [Hash] Presentation information about the font.
def configure(pdf, font)
# Accented characters will bring up a
# warning that we don't care about
Expand Down
10 changes: 10 additions & 0 deletions lib/resume/pdf/name.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
module Resume
module PDF
# Module representing the applicant name on the resume PDF
#
# @author Paul Fioravanti
module Name
module_function

# Generates the applicant name on the PDF with specified
# font, size, and text.
#
# @param pdf [Prawn::Document]
# The PDF to set the applicant name for.
# @param name [Hash]
# Contains data about presentation of the applicant name.
def generate(pdf, name)
pdf.font(name[:font], size: name[:size]) do
pdf.text(name[:text])
Expand Down

0 comments on commit 551bde4

Please sign in to comment.