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
-
#initialize(doc) ⇒ Revision
constructor
A new instance of Revision.
- #objects ⇒ Object
- #xrefstm? ⇒ Boolean
- #xreftable? ⇒ Boolean
Constructor Details
#initialize(doc) ⇒ Revision
Returns a new instance of Revision.
87 88 89 90 91 92 93 |
# File 'lib/origami/pdf.rb', line 87 def initialize(doc) @document = doc @body = {} @xreftable = nil @xrefstm = nil @trailer = nil end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
84 85 86 |
# File 'lib/origami/pdf.rb', line 84 def body @body end |
#pdf ⇒ Object
Returns the value of attribute pdf.
83 84 85 |
# File 'lib/origami/pdf.rb', line 83 def pdf @pdf end |
#trailer ⇒ Object
Returns the value of attribute trailer.
85 86 87 |
# File 'lib/origami/pdf.rb', line 85 def trailer @trailer end |
#xrefstm ⇒ Object
Returns the value of attribute xrefstm.
84 85 86 |
# File 'lib/origami/pdf.rb', line 84 def xrefstm @xrefstm end |
#xreftable ⇒ Object
Returns the value of attribute xreftable.
84 85 86 |
# File 'lib/origami/pdf.rb', line 84 def xreftable @xreftable end |
Instance Method Details
#each_object(&b) ⇒ Object
109 110 111 |
# File 'lib/origami/pdf.rb', line 109 def each_object(&b) @body.each_value(&b) end |
#objects ⇒ Object
113 114 115 |
# File 'lib/origami/pdf.rb', line 113 def objects @body.values end |
#xrefstm? ⇒ Boolean
105 106 107 |
# File 'lib/origami/pdf.rb', line 105 def xrefstm? not @xrefstm.nil? end |
#xreftable? ⇒ Boolean
101 102 103 |
# File 'lib/origami/pdf.rb', line 101 def xreftable? not @xreftable.nil? end |