Hi,
I am not too clear regarding the meaning of "send the parsed data to
extension".
In my case, the extension has the default values while the file has the
user-definable parameters. For user's ease-of-use, he needs to do only
"require 'my_extension'". my_extension defines several global
(configuration) parameters with their default values. The user, however,
can also change the parameters in a separate file called conf.rb, which
can simply contain statements such as
$param1 = myValue
Therefore, in my_extension, first the global variables are defined with
their default values, and then, it may be overridden by the Ruby
statements in conf.rb.
Also, I remember that in Tcl, there is a "source" statement which is
pretty similar to C's #include directive, which has the net effect of
inserting the content of the file at that point. Is Ruby's
"rb_require" or "rb_load" the same as Tcl's "source"?
Regards,
Bill
========================================================================
Erik Bagfors <erik / bagfors.nu> wrote:
> Why go ruby->C->ruby? Why not do
> 1) parse the file
> 2) require your extension
> 3) send the parsed data to extension?
> /Erik