Class: Pdftotext::CLI
- Inherits:
-
Object
- Object
- Pdftotext::CLI
- Defined in:
- lib/pdftotext/cli.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ :layout => true }
Instance Method Summary collapse
Instance Method Details
#run_command(*args) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/pdftotext/cli.rb', line 8 def run_command(*args) = DEFAULT_OPTIONS.merge(args.pop) args = args.concat () output, status = Open3.capture2e(bin_path, *args) raise "Command `#{bin_path} #{args.join(" ")}` failed: #{output}" if status.exitstatus != 0 output end |