IntelliJ IDEA 2017.1 Help

Creating Ruby Class

In this section:

Introduction

As mentioned in the section Populating Projects, IntelliJ IDEA allows you to generate Ruby classes. So doing, it's possible to create classes nested in the right modules.

Generating a Ruby class

This how it's done.

  1. Press Alt+Insert.
  2. From the pop-up menu, choose Ruby Class.
  3. In the New Ruby Class dialog box, enter the Ruby class name:
    /help/img/idea/2017.1/rm_new_class.png

    Note that IntelliJ IDEA allows you to create classes prepended by modules. If required, prepend the class name with module name:

    /help/img/idea/2017.1/rm_new_class_with_module.png

IntelliJ IDEA creates a new Ruby class and opens it for editing. If a module name has been specified, it is displayed in the editor:

/help/img/idea/2017.1/rm_new_class1.png

See Also

Last modified: 18 July 2017