RubyMine 2017.2 Help

Exploring Navigation and Search

What these tutorials are about

In this series of tutorials, we’re going to navigate around your code in the most efficient way. With the example code provided below you can try all of the features mentioned in these tutorials.

The tutorials are located in the ascending order: the first one describes the most basic navigation facilities of RubyMine, while the last ones relate to alternative ways of navigation.

All the tutorials use the same example code.

Learning all the navigation features and capabilities is out of scope. With these tutorials you’ll learn the most important ways to navigate around your code by example.

Before you start

Make sure that:

  • You are working with RubyMine. If you still do not have RubyMine, download it from this page. To install RubyMine, follow the instructions, depending on your platform.

    This tutorial has been created with RubyMine version 2017.1.

  • You have created a project.

Preparing an example

Do the following:

  1. Add directory Animals under your project root (Alt+Insert | Directory).
  2. Create the following Ruby files (Alt+Insert | Ruby Class):
    • mammalia.rb
    • carnivorae.rb
    • herbivorae.rb
  3. Add the following code to the classes:
    • mammalia.rb:
      class Mammalia < Object @extremities = 4 def proliferates pass end def feeds puts "Milk" end end class Marsupialia < Mammalia def proliferates puts "poach" end end class Placentalia < Mammalia def proliferates puts "placenta" end end class Feline < Placentalia def colors color = "?" puts color end def sounds sound = "?" puts sound end end class Cat < Placentalia color = "stripes and points" sound = "miaou" puts (color,sound) end class Tiger < Placentalia end cat = Cat.new puts cat.colors
    • carnivorae.rb:
      class Carnivorae < Mammalia def food puts "meat" end end
    • herbivorae.rb:
      class Herbivorae < Mammalia def food puts "grass" end end

What's next?

Let's begin with Part 1 and explore the most basic and often-used means of navigation.

Last modified: 21 July 2017