Introduction to

Ruby





Philosophy of Ruby


Matsumoto has said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design. He stresses that systems design needs to emphasize human, rather than computer, needs.”

INITIAL questions




What is Ruby?

  1. Dynamic
  2. Reflective
  3. General purpose
  4. Open source
  5. supports multiple programming paradigms



Features ->

Interpreted scripting language


  • Execute code on the fly (dynamic)
  • Ability to make calls to OS directly

Quick and easy


  • Simple and consistent syntax
  • Easy to understand and learn
  • Variable declarations are unnecessary
  • Variables have no type (dynamic typed)

Automatic Memory Management


  • No need to release allocated memory
  • No memory leaks
  • Fewer crashes or errors

Fully Object oriented


  • Everything is an object.
  • Class, Object, Inheritance etc.     
  • Singleton methods
  • Mixins instead of multiple inheritance

INSTAllation



  1. Source code 
  2. Third party tool
  3. Package management system






HOW

And

 WHERE

Syntax and Conventions



  1. Variables
  2. Class
  3. Methods




Operators

Arithmetic Operators


comparison operators

Assignment operators

Parallel assignment



bitwise operators

a = 60 or 0011 1100
b = 13 or 0000 1101

logical operators

ternary operators



String methods


  • case methods
  • operator methods
  • other useful methods
  • string operations

Regex

Sequence of characters that helps you match or find other strings

  •   //.class  => Regexp
  • Syntax                                                         
  • Character classes
  • Special character classes
  • Repetition cases
  • Options

Date & Time utilities


  • Date
  • Datetime







Assignment

Contact



  • Skype id: dattdongare
  • Mail id: datt@cart91.com
  • Mobile: 8446353453
Made with Slides.com