Ruby

62
1361 reads

March 7, 2013

Open_Close


Open_Close

342
3124 reads

March 7, 2013

Open_Close2


Open_Close2

275
3682 reads

March 7, 2013

File_Ops


File_Ops

266
3829 reads

March 7, 2013

Copy_Files


Copy_Files

32
1211 reads

March 6, 2013

Creating Arrays


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

29
1133 reads

March 6, 2013

Test of Equality using ?method


Test for equality using the equal? method

25
1138 reads

March 6, 2013

Understanding Scope of Symbol


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

35
1192 reads

March 6, 2013

Test Value of Incoming Argument


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

32
1317 reads

March 6, 2013

Symbol Reference2


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

22
1214 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.