Ruby is a modern, object-oriented scripting language.Ruby was first designed and developed in the mid-1990s by Yukihiro Matz Matsumoto in Japan.As an open source language, Ruby has been adapted to run on many different computer platforms and architectures.The latest release is 2.0.0. Ruby was initially designed for use under UNIX and UNIX-related operating systems such as Linux, but Windows users have access to an excellent “one-click installer,” which installs Ruby, a horde of extensions, a source code editor, and various documentation, in “one click.”
Ruby is a genuine object-oriented language. Everything manipulate is an object, and the results of those manipulations are themselves objects. In Ruby, we need to define a class to represent each of the entities and need to create a number of instances of each class.The object is used interchangeably with class instance and the objects are created by calling a constructor, a special method associated with a class. The standard constructor is called new and every object has a unique object identifier. Within each class, we can define instance methods.Methods are invoked by sending a message to an object. The message contains the method’s name, along with any parameters the method may need. When an object receives a message, it looks into its own class for a corresponding method. If found, that method is executed. Using Ruby we can express ideas naturally and cleanly and this leads to programs that are easy to write and are easy to read.Ruby also lends itself to a style of programming that’s familiar to Lisp coders, but will look fairly exotic to others. The language makes it easy to create methods that act almost like extensions to the syntax. It makes the programs hotter and more readable. It also allows us to perform tasks that would normally be done in external configuration files inside the code base instead. This makes it far easier to see what’s going on.