Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I am getting an undefined method 'do_something' for #<Class:0x9c9026c> (NoMethodError) Any idea why? Commented Mar 8, 2012 at 16:15
  • 1
    You need to def self.do_something to use it as a class method. Commented Mar 8, 2012 at 16:23
  • 2
    Or leave the classes are they are and call Kernel.const_get('ClassOne').new.do_something / 'ClassOne'.constantize.new.do_something Commented Mar 8, 2012 at 16:31