BlackEdder
October 18th, 2005, 07:15 PM
Hi, I hope you guys can help me. I want to copy all the instance variables from a class to it's sub class. Simple example:
class Str < String
end
str=Str.new("ab")
str.class -> Str
string="de"
string.class -> String
Now I want to copy the string to str so that str becomes "de", but str.class -> Str.
(This is ofcourse a highly simplefied example)
class Str < String
end
str=Str.new("ab")
str.class -> Str
string="de"
string.class -> String
Now I want to copy the string to str so that str becomes "de", but str.class -> Str.
(This is ofcourse a highly simplefied example)