Content Assistance is a feature that displays a list of proposals that have been imported into operation component projects in a text editor when editing Ruby scripts. The proposals appear when you press Ctrl+Space on your keyboard or when you enter a key letter. The following shows the list of proposals. Select a proposal from the list to insert the information:
Variables, constants, methods, classes, and modules defined in the source
Variables, constants, methods, classes, and modules defined in the libraries standard to Ruby
Variables, methods, classes, and modules defined in the libraries provided by RBA
Reserved words
Syntax templates for control statements
Images representing the information to be inserted and the content of the information are shown in the list of proposals. The following table shows the images used to represent the information displayed in the list:
Image | Information type |
---|---|
Class | |
Module | |
Variable, constant | |
Method | |
Syntax template | |
Nothing displayed | Reserved words |
Usage
The following steps describe how to use input assistance to enter methods and variables into Ruby scripts:
Open the Ruby script with a text editor.
In the text editor, a list of proposals appears when you press Ctrl+Space on your keyboard or enter a key letter. The following explains when and what proposals are displayed:
Proposals for variables and methods are displayed when you press Ctrl+Space on your keyboard at the separation of words.
Proposals for classes/packages, modules, reserved words, and syntax templates for control statements that start with the letter or letters you have entered are displayed when you press Ctrl+Space on your keyboard after entering a letter or letters.
Proposals for variables and methods are displayed when you enter a period (.) after a variable name.
Proposals for variables and methods are displayed when you enter the second of two successive colons (:).
Select a proposal from the list.