elanthia-online / urnon

What is a group of liches?
BSD 3-Clause "New" or "Revised" License
1 stars 4 forks source link

feat: add Script#value support; #6

Closed ondreian closed 4 years ago

ondreian commented 4 years ago

Adds support for Script#value, like the result of a bash function.

Here is a simple example:

# demo.lic
math = Script.run("add", "1 1")
respond math.value
# math.lic
Script.current.vars[1..-1].map(&:to_i).reduce(&:+)