[go: up one dir, main page]

0% found this document useful (0 votes)
70 views2 pages

Ruby

some info about ruby

Uploaded by

Reo Gupta
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views2 pages

Ruby

some info about ruby

Uploaded by

Reo Gupta
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

RUBY

Ruby is a scripting language designed by Yukihiro Matsumoto (Matz) in 1993 at japan. Ruby runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. It is a general-purpose, interpreted programming language like PERL and Python.

What is IRb ?
Interactive Ruby (IRb) provides a shell for experimentation. Within the IRb shell, you can immediately view expression results, line by line.This tool comes along with Ruby installation so you have nothing to do extra to have IRb working. Just type irb at your command prompt and an Interactive Ruby Session will start.

Features of Ruby

Ruby is an open-source and is freely available on the Web, but it is subject to a license. Ruby is a general-purpose, interpreted programming language. Ruby is a true object-oriented programming language. Ruby is a server-side scripting language similar to Python and PERL. Ruby can be used to write Common Gateway Interface (CGI) scripts. Ruby can be embeded into Hypertext Markup Language (HTML). Ruby has a clean and easy syntax that allows a new developer to learn Ruby very quickly and easily. Ruby has similar syntax to that of many programming languages such as C++ and Perl. Ruby is very much scalable and big programs written in Ruby are easily maintainable. Ruby can be used for developing Internet and intranet applications. Ruby can be installed in Windows and POSIX environments. Ruby support many GUI tools such as Tcl/Tk, GTK, and OpenGL. Ruby can easily be connected to DB2, MySQL, Oracle, and Sybase. Ruby has a rich set of built-in functions which can be used directly into Ruby scripts.

Ruby Syntax:
Whitespace characters such as spaces and tabs are generally ignored in Ruby code, except when they appear in strings. Ruby interprets semicolons and newline characters as the ending of a statement. However, if Ruby encounters operators, such as +, -, or backslash at the end of a line, they indicate the continuation of a statement. Identifiers are names of variables, constants, and methods. Ruby identifiers are case sensitive. It mean Ram and RAM are two different identifiers in Ruby. Ruby comments start with a pound/sharp (#) character and go to EOL.

Reserved words:
The following list shows the reserved words in Ruby. These reserved words should not be used as constant or variable names in your program, however, be used as method names. BEGIN Nil And Redo Case Return Do True End Until For Def Next Alias Or Break Retry In Then elsif Unless False While Self END Not Begin Rescue Class _FILE_ Else Undef Ensure When If

Data Types Integer- Octal, hexadecimal, binary, Bignum Floats String Back slash NotationNotation \n \r \f \b \a \e \s \nnn \xnn Character represented New line Carriage return Formfeed Back space Bell Escape Space Octal notation Hexadecimal notation

You might also like