Skip to content

dorianmariecom/dorian-eval

Repository files navigation

dorian-eval

Evaluate Ruby snippets and capture stdout, stderr, and return values.

Install

gem install dorian-eval

Also included in the aggregate gem:

gem install dorian

Usage

eval [options] "ruby code"

Run eval -h for generated option details and eval -v for the installed version.

Notes

  • The library exposes Dorian::Eval.eval. The executable prints the returned result object.

Examples

Evaluate and return a value

eval "1 + 1" --returns

Use as a library

require "dorian/eval"

result = Dorian::Eval.eval(ruby: "1 + 1", fast: true)
result.returned # => 2

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors