[Ironruby-core] Passing a .NET object to the RubyEngine...

Phil Haack haacked at gmail.com
Fri Sep 28 02:46:08 EDT 2007


Hi All, I posted some code for calling IronRuby code I found in the mailing
list onto the wiki.

 

http://ironruby.rubyforge.org/wiki/wiki.pl?ExecutingIronRubyFromCSharp

 

  RubyEngine re = RubyEngine.CurrentEngine;

  string script = "s = 'let us get started'" + Environment.NewLine

    + "i = s.length");

  re.ExecuteCommand(script);

 

The only thing is, I don't know how to pass a .NET object to the context of
the RubyEngine so it can be called from within the script. I'd like to
update the example with that.

 

Any help?

 

Phil

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20070927/4c5b1502/attachment.html 


More information about the Ironruby-core mailing list