Inserting Classes into a Module Dynamically?

Hi guys,

We are now able to author code on-line, which allows us to create a
new class. We want to “insert” this new class into a module and make
it “instantly” available to the using program(s) - without restarting
them.

I think I remember reading that this is possible somehow, but I
haven’t much of clue where to look on this one.

Thanks for any assistance on this!

Thunk

thunk wrote:

Hi guys,

We are now able to author code on-line, which allows us to create a
new class. We want to “insert” this new class into a module and make
it “instantly” available to the using program(s) - without restarting
them.

I think I remember reading that this is possible somehow, but I
haven’t much of clue where to look on this one.

Look at the instance methods of Module, particularly include and extend.

Thanks for any assistance on this!

Thunk

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs