Quickly Constantize
12 February 2011
Constantizing in ruby without rails isn't intuitive. This snippet I whipped up does the trick though.
"Net::HTTP".split('::').inject(Object) {|memo,name| memo = memo.const_get(name); memo}
blog comments powered by Disqus