Dear users, I have found how to invoke class methods and use its result in the C# application. However I can''t seem to find how to invoke methodes located outside of a class. So I started wondering if this is at all possible. If it is, I would like to know how. Thanks in advance -- Posted via http://www.ruby-forum.com/.
Ivan Porto Carrero
2009-Oct-01 13:31 UTC
[Ironruby-core] calling non class methods from C#
class TheExample def output "Hello World" end end var operations = Engine.CreateOperations(); Engine.ExecuteFile(/path/to/example.rb); var instance = operations.CreateInstance(); var result = operations.InvokeMember(instance, "output"); --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Blog: http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Thu, Oct 1, 2009 at 2:58 PM, Eelco Henderichs <lists at ruby-forum.com>wrote:> Dear users, > > I have found how to invoke class methods and use its result in the C# > application. > > However I can''t seem to find how to invoke methodes located outside of a > class. So I started wondering if this is at all possible. If it is, I > would like to know how. > > Thanks in advance > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091001/cd851d25/attachment.html>
Oke thanks for the information. Not sure if I fully understand how to do this. But it surely gave me someting to work with and I can start experimenting with it. -- Posted via http://www.ruby-forum.com/.