executor v0.0.3 Executor.Ruby

This module is responsible for executing ruby code.

Summary

Functions

Generates the script to execute Ruby code. Code is rescued on error Deliminators are placed in to aid in capturing results

Returns Ruby specific file name for temporary script

Returns result map for the given code

Functions

code_template(code)

Generates the script to execute Ruby code. Code is rescued on error Deliminators are placed in to aid in capturing results

new_file_name()

Returns Ruby specific file name for temporary script

run(code)

Returns result map for the given code

iex> run(“puts ‘ayyy’; 2**3”) {:ok, %{return: “8”, stdout: “ayyy”}}