RubyMine 7.0.1 Web Help


The Extract Superclass refactoring enables extracting certain methods of a class into a superclass.


Before After
ruby_extractSuperClass1.png ruby_extractSuperClass2.png
To extract a superclass
  1. Select the desired class in one of the views, or just open it in the editor.
  2. On the main menu or on the context menu, choose Refactor | Extract | Superclass.
  3. In the Extract Superclass dialog box, specify the following information:
    • Name of the new superclass.
    • Target directory where it will be stored.
    • Methods to be included in the superclass.
  4. Proceed with the refactoring.

See Also


Web Resources: