Databases Reference
In-Depth Information
B.1 Introduction to Ruby
Ruby is a object-oriented programming language. It was created by Yukihir
"Matz" Matsumoto in 1995. Ruby language has evolved since then and at the
time of writing this topic, the latest stable version of Ruby is 1.8.4. Ruby's syntax
was inspired by Perl and Smalltalk and also shares some features with Python
and LISP. Ruby is available as a free software download from its official Web site
given below. This Web site also provides documentation and a community
mailing list:
http://www.ruby-lang.org/en/20020102.html
Ruby language is well documented (as of writing this topic there are more than
9000 methods that are available in Ruby language). you can find both core API
and standard library documentation on the following Web site:
http://ruby-doc.org/
In today's software development world, we have choices. Ruby can be
considered to be a great choice for enterprise Web application development
because it distinguishes itself from other available choices in many ways. In
order to understand these features, you would need to refer to the Ruby
language documentation, mentioning that in detail is beyond the scope of this
appendix.
Ruby employs a clean syntax. You are not required to put a semicolon at the
end of the statement. It can have disadvantages also, because a programmer
has to take care of code layout independently.
Ruby has regular expressions built into the language. They are also treated
as objects and manipulated in the program for example, pattern matching,
and so on.
Ruby is a single inheritance only, that means a Ruby class can have only one
parent. However, Ruby provides multiple inheritance-type functionality by
allowing classes to include the functionalities from a partial class definition.
Ruby provides a hierarchy of exception classes, which is easy to use.
Ruby implements threads in the language interpreter code itself; hence, it is
independent of the operating system. However, Ruby threads do not utilize
more than one CPU.
Ruby language comes with a built-in debugger. You can run debugger by
invoking the debugger with -r option.
Ruby features its own shell called “Interactive Ruby”. You can simply invoke
interactive Ruby by typing irb command on your system. This allows you to
play with Ruby if you are new to the language.
 
 
Search WWH ::




Custom Search