[Ruby] Intercommunication

Post any examples or modules that you want to share here
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: [Ruby] Intercommunication

Post by tulamide »

Tronic wrote:I want to also share this thing (a little magic?):

if you create a module and give it a name:
___SYSTEM___
it will work to the ruby interpreter level (main),
if you try to write the self function in a ruby module,
you'll see that it will not give you a RubyEdit instance,
but it will result in the 'main instance of the ruby interpreter',

then, in it add all your modules, classes, and codes that you want them declared before all things,
this solves the stress of adding new things to the whole Ruby Flowstone System
without having to take account of the order of creation of RubyEdit module,

so in short, everything that contains this module will always be loaded before anything else.

try it, and then tell me.

Finally had time to check it out.

module ___SYSTEM___
end

produces "class/module name must be CONSTANT" error
I assume you have a full Ruby install, maybe with $PATH variables set?
"There lies the dog buried" (German saying translated literally)
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: [Ruby] Intercommunication

Post by Tronic »

I mean a primitive "module", and not a ruby module ...
I have not correctly specified it, my text, sorry :oops:

Edit: so an primitive Module with the Caption text:
___SYSTEM___

I have added this the correction in the preview post.
Post Reply