Skip to content

Instantly share code, notes, and snippets.

@celldee
Created May 1, 2009 22:22
Show Gist options
  • Save celldee/105299 to your computer and use it in GitHub Desktop.
Save celldee/105299 to your computer and use it in GitHub Desktop.
Ruby - creating objects from strings
Create uninstantiated class from a string
=========================================
Object::const_get('String')
Create instantiated class from a string
=======================================
Object::const_get('String').new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment