Class: Origami::PDF::Revision
- Inherits:
-
Object
- Object
- Origami::PDF::Revision
- Defined in:
- lib/origami/pdf.rb
Overview
Class representing a particular revision in a PDF file. Revision contains :
-
A Body, which is a sequence of Object.
-
A XRef::Section, holding XRef information about objects in body.
-
A Trailer.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#pdf ⇒ Object
Returns the value of attribute pdf.
-
#trailer ⇒ Object
Returns the value of attribute trailer.
-
#xrefstm ⇒ Object
Returns the value of attribute xrefstm.
-
#xreftable ⇒ Object
Returns the value of attribute xreftable.
Instance Method Summary collapse
- #each_object(&b) ⇒ Object
- #has_xrefstm? ⇒ Boolean
- #has_xreftable? ⇒ Boolean
-
#initialize(doc) ⇒ Revision
constructor
A new instance of Revision.
- #objects ⇒ Object
Constructor Details
#initialize(doc) ⇒ Revision
Returns a new instance of Revision.
85 86 87 88 89 90 91 |
# File 'lib/origami/pdf.rb', line 85 def initialize(doc) @document = doc @body = {} @xreftable = nil @xrefstm = nil @trailer = nil end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
82 83 84 |
# File 'lib/origami/pdf.rb', line 82 def body @body end |
#pdf ⇒ Object
Returns the value of attribute pdf.
81 82 83 |
# File 'lib/origami/pdf.rb', line 81 def pdf @pdf end |
#trailer ⇒ Object
Returns the value of attribute trailer.
83 84 85 |
# File 'lib/origami/pdf.rb', line 83 def trailer @trailer end |
#xrefstm ⇒ Object
Returns the value of attribute xrefstm.
82 83 84 |
# File 'lib/origami/pdf.rb', line 82 def xrefstm @xrefstm end |
#xreftable ⇒ Object
Returns the value of attribute xreftable.
82 83 84 |
# File 'lib/origami/pdf.rb', line 82 def xreftable @xreftable end |
Instance Method Details
#each_object(&b) ⇒ Object
107 108 109 |
# File 'lib/origami/pdf.rb', line 107 def each_object(&b) @body.each_value(&b) end |
#has_xrefstm? ⇒ Boolean
103 104 105 |
# File 'lib/origami/pdf.rb', line 103 def has_xrefstm? not @xrefstm.nil? end |
#has_xreftable? ⇒ Boolean
99 100 101 |
# File 'lib/origami/pdf.rb', line 99 def has_xreftable? not @xreftable.nil? end |
#objects ⇒ Object
111 112 113 |
# File 'lib/origami/pdf.rb', line 111 def objects @body.values end |