Friday, September 10, 2010

Some syntaxes of ruby language

  1. brackets are optional
  2. if then end if, then is optional if there's line-break after if
  3. sometimes, return is optional in a method, it will return the last value
  4. localVar, $globalVar, @instanceVar, ConstantVar