Archive for March 18th, 2008

$0 , __FILE__

Posted on March 18, 2008. Filed under: Uncategorized |

$0 is the file which load any other ruby file which is contained in __FILE__….

Read Full Post | Make a Comment ( None so far )

Splat Operator in Ruby

Posted on March 18, 2008. Filed under: Uncategorized |

* is called the splat operator in ruby .The first time you come across is for variable argument.that is exactly what you will be using it for.it should be used as the last argument.
name,*rest_of_address = address[]
would put the first argument to name and rest to the * argument…
THe other thing about it is it gives [...]

Read Full Post | Make a Comment ( None so far )

Structures in Ruby

Posted on March 18, 2008. Filed under: Uncategorized |

If you wanted just a storage variable in terms of big structure with no code on them .The best way is to call Struct.new followed by what ever structure fields you want on them.Once the structure is created you can create a new on it by just calling the name of the Structure .new [...]

Read Full Post | Make a Comment ( None so far )

  •  

    March 2008
    M T W T F S S
    « Feb   Apr »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31  
  • My Fav

Liked it here?
Why not try sites on the blogroll...