Sha256: ee7f5453f27a9b78423e7464afc019c5e46ecc192c1d3217c1f2d2ab9402db7b

Contents?: true

Size: 433 Bytes

Versions: 9

Compression:

Stored size: 433 Bytes

Contents

module Postdoc
  # A job is a single "print" in a batch and binds a document to a setting.
  class Job
    def initialize(document, settings: PrintSettings.new)
      @settings = settings
      @document = HTMLDocument.new(document)
    end

    # Return the result of the job.
    def result(client)
      client.print_document(@document.path, settings: @settings)
    end

    def cleanup
      @document.cleanup
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
postdoc-0.5.0 lib/postdoc/job.rb
postdoc-0.4.5 lib/postdoc/job.rb
postdoc-0.4.4 lib/postdoc/job.rb
postdoc-0.4.3 lib/postdoc/job.rb
postdoc-0.4.2 lib/postdoc/job.rb
postdoc-0.4.1 lib/postdoc/job.rb
postdoc-0.4.0 lib/postdoc/job.rb
postdoc-0.3.9 lib/postdoc/job.rb
postdoc-0.3.8 lib/postdoc/job.rb