Class: PDFMeta::Command
- Inherits:
-
Object
- Object
- PDFMeta::Command
- Defined in:
- lib/pdf_meta/command.rb
Instance Method Summary collapse
-
#initialize(path = '', options = {}) ⇒ Command
constructor
A new instance of Command.
- #run! ⇒ Object
Constructor Details
#initialize(path = '', options = {}) ⇒ Command
Returns a new instance of Command.
4 5 6 7 8 9 |
# File 'lib/pdf_meta/command.rb', line 4 def initialize(path='', ={}) raise ArgumentError if path.empty? @path = path = .merge() end |
Instance Method Details
#run! ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pdf_meta/command.rb', line 11 def run! runner = PDFMeta::Runner.new(command) if runner.success? PDFMeta::Parser.new(runner.output).results else raise runner.error end end |