C# Paste by Anonymous
Description: None
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ScriptRuntime runtime = Ruby.CreateRuntime(); ScriptEngine engine = Ruby.GetEngine(runtime); Dictionary<string, object> variables = new Dictionary<string,object>(); ScriptScope scope = engine.CreateScope(variables); string script = @" puts 'Vincent! We happy?' def test puts 'Yeah, we happy.' end test "; engine.Execute(script, scope); |