Ruby

62
1346 reads

March 7, 2013

Open_Close


Open_Close

342
3110 reads

March 7, 2013

Open_Close2


Open_Close2

275
3664 reads

March 7, 2013

File_Ops


File_Ops

266
3813 reads

March 7, 2013

Copy_Files


Copy_Files

32
1195 reads

March 6, 2013

Creating Arrays


The example demonstrates creation of an array and displays it's elements.

29
1114 reads

March 6, 2013

Test of Equality using ?method


Test for equality using the equal? method

25
1124 reads

March 6, 2013

Understanding Scope of Symbol


The scope in which a symbol is declared does not affect its uniqueness.

35
1175 reads

March 6, 2013

Test Value of Incoming Argument


A method might contain code to test the value of the incoming argument

32
1300 reads

March 6, 2013

Symbol Reference2


The ‘meaning’ of the symbol changes according to its scope.

22
1194 reads

March 6, 2013

Symbol Reference


The variables $f1, $f2 and $f3 are assigned the symbol :Fred in three different scopes: module One, module Two and the ‘main’ scope.