Ruby quirks

Posted by missnadia on June 24, 2019

reviewing Ruby.

advantages of using Ruby:

  • pure object-oriented language
  • open-source
  • metaprogramming
  • clean and simple syntax

types of variables:

  • global ($variable_name = "Hello")
  • local (variable_name = "Hello")
  • class (@@VARIABLE_NAME = "Hello")
  • instance (@variable_name = "Hello")

blocks v. procs v. lambdas

  • blocks - not an object, but code used by methods
  • procs - object; does not check number of arguments
  • lambdas - object; checks number of arguments