Create COM server with Ruby?
Ruby on Windows has the win32::ole library that allows Ruby to act as a COM client, similar to VBScript and o开发者_Python百科ther scripting languages (Python, Perl, etc. with win32 bindings). However, I am wondering if it is possible to create a COM server with Ruby that can be accessed from other clients. Python makes this possible, even simple, with its win32 package, but I have not been able to find any examples of this with Ruby.
Edit: Turns out that there is a way, as @Kevin Walzer points out in a followup comment. See below.
No.
The long answer is you can create a C# wrapper which delegates the work to IronRuby. See this question:
Can I compile IronRuby project in VS2010 into DLL/exe file?
This resource might help also.
https://github.com/rifraf/IronRubyEmbeddedApps
Well, there's always Python, which makes creating COM servers trivially easy. I'm giving up on Ruby for this purpose.
精彩评论