Ruby

Updated: 04/26/2017 by Computer Hope

RubyRuby is an open source object-oriented programming language. The first version of the language (0.95) was released in 1995, and in 2011, version 1.9.3 was released.

Ruby has been gaining popularity, and a framework called Ruby on Rails has helped to increase its usage for web programming. The Ruby language is completely object-oriented, in that everything is an object. For instance, even the most basic data types like integers have methods and instance variables. This provides a greater ability to use method chaining, where many lines of code can be consolidated into one. For example, if you wanted to use three different methods on a string, one way would be to write several lines of code as shown below.

x = "Computer".reverse
y = x.upcase
z = y.downcase

These methods could instead be chained, as shown in the below code.

z = "Computer".reverse.upcase.downcase

Ruby is also known for being a flexible language, since it allows for programmers to make modifications to various parts of the language if desired. More information on Ruby programming can be found using the resources below.

Related pages

<ruby>, Object-Oriented programing, Programming terms, Programming languages, Server side scripting