wiki:Tutorial/HowtoWriteScripts/RubyResources

Orbit > Tutorial? > Writing Experiment Scripts? > Ruby Resources

Ruby

Ruby's syntax is similar to other object-oriented languages like Java or C++. In Ruby everything that is represented is an object, even numbers like 1. Functions or procedures are termed methods and are called using the name of the object, a period, and the name of the method, e.g., node.prototype. Methods in ruby are usually small.

Variables associated with objects are termed properties and are referred to by the name of the object, a period, and the name of the property, e.g., w.essid. The formatting of ones use of the language is at the discretion of the programmer, but consistency is helpful, especially in the use of indentation and the placement of the opening and closing braces for code blocks.

Ruby Resources

There are two primary resources for the Ruby programming language. The first is the Ruby Web site. It contains current information on Ruby and a link to download it for free. The second is an excellent tutorial and reference book, Programming Ruby The Pragmatic Programmer's Guide, Second Edition, Dave Thomas with Chad Fowler and Andy Hunt, Pragmatic Bookshelf, October 2004, ISBN:0-9745140-5-5, 864 pages; see http://www.pragmaticprogrammer.com/titles/ruby.

Last modified 12 years ago Last modified on 11/26/05 19:48:14