Method: Yarnlock::JsExecutor.execute

Defined in:
lib/yarnlock/js_executor.rb

.execute(script, stdin) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/yarnlock/js_executor.rb', line 5

def self.execute(script, stdin)
  IO.popen(script_path(script), 'r+') do |io|
    io.puts stdin
    io.close_write
    io.gets
  end
end