# Ruby go to declaration [edit]

This page gives an overview of the Ruby go to declaration feature.

## Introduction

You can navigate your project by going to a particular element's "declaration". This tip describes how to use this feature, with a couple alternatives.

The Ruby editor keeps track of all sorts of things inside your project. One thing it tracks is an internal model of the various classes, modules, files, methods and variables in the project. With this information it can often offer the ability to jump to a particular object's declaration.

## Instructions

To use this feature, simply highlight a particular token in the source code. You can also simply hover over the element without selecting it. Then press the F3 key, or right click and choose go to declaration. If the Ruby editor knows enough about the particular token, it will open the editor to the element's declaration. For variables, this is the first assignment to the variable. Classes, modules and methods are set to the location of their name. If there are multiple matches, the editor will pop up a dialog asking which instance of the class or module declaration you'd like to jump to.

The Ruby editor also supports hyperlink navigation which performs the same action. Holding down Ctrl will show tokens as hyperlinks. Clicking the hyperlink will invoke the Go to Declaration feature.

## Related Topics

- Ruby Editor
- Ruby code completion
- Ruby code formatting
- Ruby code folding

Retrieved from "http://aptana.com/docs/index.php/Ruby_go_to_declaration"

Categories: AptanaHelp | RadRails | RDT