Monday, March 06, 2006

Interactive Ruby

Interactive Ruby means using a Command window. irb is a Ruby Shell, useful for trying out Ruby code. When you installed your Ruby software, the System Environment variable path is already set to point to the bin folder of Ruby.
To use irb, open a new Command window and type:

irb --simple-prompt

A prompt appears as >>

You can place a Ruby program directly on the command line. For example, you can start using this as a simple calculator. If you type 3+4 and then press the enter key, you get 7. Typing exit or quit, closes the Command window.
Technorati Tags:
Blogs linking to this article

0 Comments:

Post a Comment

<< Home