Ruby

29
1233 reads

February 28, 2013

Local Variable scope


The example demonstrates the scope of a local variable.

27
1376 reads

February 28, 2013

Iterate2


Iterators are nothing but methods supported by collections. Objects that store a group of data members are called collections. In Ruby, arrays and hashes can be termed collections.

36
1290 reads

February 28, 2013

Iterate1


Iterators are nothing but methods supported by collections. Objects that store a group of data members are called collections. In Ruby, arrays and hashes can be termed collections.

27
448 reads

February 28, 2013

Iterate


Iterators are nothing but methods supported by collections. Objects that store a group of data members are called collections. In Ruby, arrays and hashes can be termed collections.

40
1232 reads

February 28, 2013

Closure2


Closures are functions that are bound to the environment that they were defined in.

23
1373 reads

February 28, 2013

Closure


Closures are functions that are bound to the environment that they were defined in.

38
1231 reads

February 28, 2013

21
1254 reads

February 28, 2013

27
1303 reads

February 28, 2013

39
1402 reads

February 28, 2013

Block7


Ruby blocks are syntax literals for Proc objects, defined as instructions between curly braces {} (or do...end phrases for multiline blocks) which may optionally take arguments and return values (e.g.