Class: PDF::Inspector::XObject
- Inherits:
-
PDF::Inspector
- Object
- PDF::Inspector
- PDF::Inspector::XObject
- Defined in:
- lib/pdf/inspector/xobject.rb
Instance Attribute Summary collapse
-
#page_xobjects ⇒ Object
Returns the value of attribute page_xobjects.
-
#xobject_streams ⇒ Object
Returns the value of attribute xobject_streams.
Instance Method Summary collapse
- #begin_page(*params) ⇒ Object
-
#initialize ⇒ XObject
constructor
A new instance of XObject.
- #resource_xobject(*params) ⇒ Object
- #store_streams(resource_name, stream) ⇒ Object
Methods inherited from PDF::Inspector
Constructor Details
#initialize ⇒ XObject
Returns a new instance of XObject.
6 7 8 9 |
# File 'lib/pdf/inspector/xobject.rb', line 6 def initialize @page_xobjects = [] @xobject_streams = {} end |
Instance Attribute Details
#page_xobjects ⇒ Object
Returns the value of attribute page_xobjects.
4 5 6 |
# File 'lib/pdf/inspector/xobject.rb', line 4 def page_xobjects @page_xobjects end |
#xobject_streams ⇒ Object
Returns the value of attribute xobject_streams.
4 5 6 |
# File 'lib/pdf/inspector/xobject.rb', line 4 def xobject_streams @xobject_streams end |
Instance Method Details
#begin_page(*params) ⇒ Object
16 17 18 |
# File 'lib/pdf/inspector/xobject.rb', line 16 def begin_page(*params) @page_xobjects << [] end |
#resource_xobject(*params) ⇒ Object
11 12 13 14 |
# File 'lib/pdf/inspector/xobject.rb', line 11 def resource_xobject(*params) @page_xobjects.last << params.first store_streams(params.first, params.last) end |
#store_streams(resource_name, stream) ⇒ Object
20 21 22 |
# File 'lib/pdf/inspector/xobject.rb', line 20 def store_streams(resource_name, stream) @xobject_streams[resource_name] = stream end |