Module: Grapht::Shell
- Defined in:
- lib/grapht/shell.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.exec(type, json_data, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/grapht/shell.rb', line 10 def self.exec(type, json_data, ={}) = *.select { |k,v| ALLOWED_OPTIONS.include? k }.flatten out, err, status = Open3.capture3 CMD, type, *, stdin_data: json_data raise Grapht::Shell::Error, err unless status.success? out end |