Method: PutText::Cmdline#run
- Defined in:
- lib/puttext/cmdline.rb
#run(args) ⇒ Object
Run the commmand line tool puttext.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/puttext/cmdline.rb', line 18 def run(args) = parse_args(args) po_file = Extractor.new.extract([:path]) if [:output_file] with_output_file([:output_file]) { |f| po_file.write_to(f) } else po_file.write_to(STDOUT) end rescue => e error(e) end |