Ruby tutorial session 1

Ruby

"I always thought Smalltalk would beat Java. I just didn’t know it would be called ‘Ruby’ when it did”
- Kent Beck

Ruby Language:

  • Generic, interpreted, reflective, with garbage collection
  • Optimized for people rather than computers
  • More powerful than Perl, more object oriented than Python
  • Everything is an object. There are no primitive types.
  • Strong dynamic typing

Everything in Ruby is:

  • Assignment – binding names to objects
  • Control structures – if/else, while, case
  • Sending messages to objects – methods

Ruby is Line Oriented

  • Statements are separated by line breaks
  • You can put several statements on one line if you separate them by semicolon
  • For long statements you can escape the line break with backslash
  • After an operator, comma, or the dot in a method invocation you can have a line break and Ruby will know that the statement continues on the next line
  • You can have line breaks in strings

For Quick Start follow the link:


 In next post you will get into Ruby concepts.

No comments:

Post a Comment

My Experience in RUBYCONF INDIA 2016

Hi Readers, Rubyconf India is a global event complementing other RubyConf events across the world. I attended this event held on 19-20 ma...