class Postdoc::Job

A job is a single “print” in a batch and binds a document to a setting.

Public Class Methods

new(document, settings: PrintSettings.new) click to toggle source
# File lib/postdoc/job.rb, line 4
def initialize(document, settings: PrintSettings.new)
  @settings = settings
  @document = HTMLDocument.new(document)
end

Public Instance Methods

cleanup() click to toggle source
# File lib/postdoc/job.rb, line 14
def cleanup
  @document.cleanup
end
result(client) click to toggle source

Return the result of the job.

# File lib/postdoc/job.rb, line 10
def result(client)
  client.print_document(@document.path, settings: @settings)
end