Ruby

62
881 reads

March 7, 2013

Open_Close


Open_Close

342
2748 reads

March 7, 2013

Open_Close2


Open_Close2

275
3235 reads

March 7, 2013

File_Ops


File_Ops

266
3431 reads

March 7, 2013

Copy_Files


Copy_Files

32
878 reads

March 6, 2013

Creating Arrays


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

29
801 reads

March 6, 2013

Test of Equality using ?method


Test for equality using the equal? method

25
818 reads

March 6, 2013

Understanding Scope of Symbol


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

35
870 reads

March 6, 2013

Test Value of Incoming Argument


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

32
925 reads

March 6, 2013

Symbol Reference2


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

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