--001636c5abc835d11b049683826f
Content-Type: text/plain; charset=ISO-8859-1

Do you mean something like this?

irb(main):001:0> class A
irb(main):002:1> attr_accessor :a
irb(main):003:1> def initialize(s)
irb(main):004:2> @a  
irb(main):005:2> end
irb(main):006:1> end
nil
irb(main):007:0> class B
irb(main):008:1> attr_accessor :b
irb(main):009:1> def initialize(s)
irb(main):010:2> @b  
irb(main):011:2> end
irb(main):012:1> end
nil
irb(main):013:0> x  B"
"B"
irb(main):014:0> def test(x)
irb(main):015:1> if x "B"
irb(main):016:2> B.new(x)
irb(main):017:2> else
irb(main):018:2* A.new(x)
irb(main):019:2> end
irb(main):020:1> end
nil
irb(main):021:0> x  est(x)
#<B:0xee0bd8 @b">
irb(main):022:0> x
#<B:0xee0bd8 @b">
irb(main):023:0>

On Fri, Dec 3, 2010 at 10:39 AM, David E. <davidreynon / gmail.com> wrote:

> Yeah maybe the string confused things. I don't want to even convert to
> string.
>
> The value in string is the "human name" of the class i want to convert
> it to.
>
> So i'm converting a string into an object of class type of the string
> value.
>
> So convert "Dave" into an object of type Dave()
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

--001636c5abc835d11b049683826f--