Skip to content

Instantly share code, notes, and snippets.

@j-mcnally
Created April 30, 2014 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-mcnally/1ffc606dd2460063b4c0 to your computer and use it in GitHub Desktop.
Save j-mcnally/1ffc606dd2460063b4c0 to your computer and use it in GitHub Desktop.
Const get
class SomeFactory
def self.dosomething(class_name, *args)
Object.const_get(class_name).new(*args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment