Eval class

Hello

I wanna create class on the fly, this class is generate in method, it
need eval a class and instace a new object of this class. How i do it?

Bruno

Hi –

On Thu, 20 Jul 2006, Bruno wrote:

Hello

I wanna create class on the fly, this class is generate in method, it
need eval a class and instace a new object of this class. How i do it?

c = Class.new(OptionalSuperclass) do
def x
end
end

etc.

David


http://www.rubypowerandlight.com => Ruby/Rails training & consultancy
http://www.manning.com/black => RUBY FOR RAILS (reviewed on
Slashdot, 7/12/2006!)
http://dablog.rubypal.com => D[avid ]A[. ]B[lack’s][ Web]log
[email protected] => me

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