Class: Pdf2Html::Caller
- Inherits:
-
Object
- Object
- Pdf2Html::Caller
- Defined in:
- lib/pdf2html/caller.rb
Instance Attribute Summary collapse
- #cmd ⇒ Object
-
#cmd_options ⇒ Object
readonly
Returns the value of attribute cmd_options.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(input_file, options = {}, output_file = "") ⇒ Caller
constructor
A new instance of Caller.
- #run ⇒ Object
Constructor Details
#initialize(input_file, options = {}, output_file = "") ⇒ Caller
Returns a new instance of Caller.
9 10 11 12 13 |
# File 'lib/pdf2html/caller.rb', line 9 def initialize(input_file, = {}, output_file = "") args = { pdf: input_file, html: output_file } = OptionProvider.new(args, ) @line = ::Cocaine::CommandLine.new(cmd, .to_s) end |
Instance Attribute Details
#cmd ⇒ Object
19 20 21 |
# File 'lib/pdf2html/caller.rb', line 19 def cmd @cmd ||= which('pdf2htmlex') || which('pdf2htmlEX') end |
#cmd_options ⇒ Object (readonly)
Returns the value of attribute cmd_options.
6 7 8 |
# File 'lib/pdf2html/caller.rb', line 6 def end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
6 7 8 |
# File 'lib/pdf2html/caller.rb', line 6 def line @line end |
Instance Method Details
#run ⇒ Object
15 16 17 |
# File 'lib/pdf2html/caller.rb', line 15 def run @line.run(.to_h) end |