The usual idiom which also works with nested names is like this:
cls = name.split('::').inject(Object) {|cl, part| cl.const_get part}
Now you can do
obj =
cls.new
In your case it's sufficient to do
cls = Object.const_get(arg1) # "RADIUS"
codec =
cls.new
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/