Class: PDF::Reader::MetadataStrategy
- Inherits:
-
AbstractStrategy
- Object
- AbstractStrategy
- PDF::Reader::MetadataStrategy
- Defined in:
- lib/pdf/reader/metadata_strategy.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AbstractStrategy
Constructor Details
This class inherits a constructor from PDF::Reader::AbstractStrategy
Class Method Details
.to_sym ⇒ Object
7 8 9 |
# File 'lib/pdf/reader/metadata_strategy.rb', line 7 def self.to_sym :metadata end |
Instance Method Details
#process ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/pdf/reader/metadata_strategy.rb', line 11 def process return false unless [:metadata] # may be useful to some people callback(:pdf_version, ohash.pdf_version) # ye olde metadata callback(:metadata, [decoded_info]) if info? # new style xml metadata callback(:xml_metadata, []) if # page count if pages? count = ohash.object(pages[:Count]) callback(:page_count, count.to_i) end end |