Class: RGhost::MergePdfs

Inherits:
Object
  • Object
show all
Defined in:
lib/rghost/merge_pdfs.rb

Constant Summary collapse

DEFAULT_OPTIONS =
{ :convert =>  true }

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



2
3
4
# File 'lib/rghost/merge_pdfs.rb', line 2

def error
  @error
end

#errorsObject (readonly)

Returns the value of attribute errors.



2
3
4
# File 'lib/rghost/merge_pdfs.rb', line 2

def errors
  @errors
end

Class Method Details

.merge(pdfs, options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rghost/merge_pdfs.rb', line 5

def self.merge(pdfs, options={})
  rge = RGhost::Engine.new(pdfs,DEFAULT_OPTIONS.merge(options))
  out = rge.render(:pdf)
  @error = rge.error
  @errors = rge.errors
  out
end