Exploring Navigation and Search
In this section:
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:
- Add directory
Animalsunder your project root (Alt+Insert | ).
- Create the following Ruby files (Alt+Insert | ):
- Add the following code to the classes:
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
class Carnivorae < Mammalia def food puts "meat" end end
class Herbivorae < Mammalia def food puts "grass" end end
Let's begin with Part 1 and explore the most basic and often-used means of navigation.