This link has been bookmarked by 10 people . It was first bookmarked on 25 Sep 2007, by swan lin.
-
22 Oct 16
-
Ruby is a scripting language. There is no special main method in Ruby from which execution begins.
-
The Ruby interpreter is given a script of statements to execute, and it begins executing at the first line and continues to the last line.
-
simply writes onto the screen whatever comes after it
-
Parentheses are usually optional with a method call. These calls are all valid:
foobar
foobar()
foobar(a, b, c)
foobar a, b, c -
Technically speaking, these methods are provided by Ruby's Kernel module
-
-
29 Aug 16
-
24 May 09
-
20 Feb 08
-
25 Sep 07
-
Press the F8 key to open an output window
-
Ctrl+Shift+I - this opens the Indentation Settings window
-
All Ruby source files have the .rb file extension
-
Foo class has name foo.rb
-
puts (s in puts stands for string; puts really means put string)
-
simply writes onto the screen whatever comes after it
-
g) > simply writes onto the screen whatever comes after it,
-
a. Parentheses are usually optional with a method call. These calls are all valid:
foobar
foobar()
foobar(a, b, c)
foobar a, b, c -
everything from an integer to a string is considered to be an object
-
To use a method, you need to put a dot after the object, and then append the method name.
-
Some methods such as puts and gets are available everywhere and don't need to be associated with a specific object.
-
provided by Ruby's Kernel module
-
When you run a Ruby application, an object called main of class Object is automatically created. This object provides access to the Kernel methods.
-
String literals are sequences of characters between single or double quotation marks
-
I am using single quotes around Hello. ' is more efficient than "
-
Ruby is an interpreted language
-
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.