therubyrhio可以让你在Ruby程序中嵌入Mozilla的Rhio引擎。
示例代码:
Rhio::Cotext.ope do |cotext| cotext["say"] = lambda {|word, times| word * times} cotext.eval("say("Hello", 3)") #=> HelloHelloHelloed开源地址
https://github.com/rubyjs/therubyrhino授权协议
MIT
therubyrhio可以让你在Ruby程序中嵌入Mozilla的Rhio引擎。
示例代码:
Rhio::Cotext.ope do |cotext| cotext["say"] = lambda {|word, times| word * times} cotext.eval("say("Hello", 3)") #=> HelloHelloHelloedtherubyrhino 可以让你在 Ruby 程序中嵌入 Mozilla 的 Rhino 引擎。 示例代码:
Rhino::Context.open do |context|
con...
评论