From: gabriele renzi Date: 2004-12-28T05:21:50+09:00 Subject: Re: Bare-bones Ruby Leiradella, Andre V Matos Da Cunha ha scritto: > I've been looking for a script language that could be used in Lua's place > for FullMoon and I found Ruby. I downloaded it (3.4MB!) and I saw that it > comes with a great set of modules. So my first questions to the list are: > > 1) Is it possible to build Ruby without those modules? How? most of the modules are pure ruby extensions or C extensions that can be loaded at runtime, not basicly needed. But ruby has more things builtin that Lua, I think (i.e. sockets are C extensions, SOAP is a ruby one, Array and Hash are builtins) > 2) How do I embed Ruby in a host program? There is the "programming ruby" documentation, but you may find usefule this pages: http://metaeditor.sourceforge.net/embed/ http://www.rubygarden.org/ruby?EmbedRuby > 3) What are the functions that must be called to make Ruby load a program, > to create an instance of a class defined in Ruby, to call methods with this > instance etc.? Is this API documented somewhere? README.ext in the source distribution, I think. > 4) Does Ruby support multiple inheritance or something similar to Java's > interfaces? modules can be mixed in to fit for 99% of good uses of multiple inheritance, and callbacks like Module#included or Class#inherited can be used to simulate interfaces a-la java (if you look on the ruby application archive, raa.ruby-lang.org, you may find some pure ruby interface system implementations)