SlideShare a Scribd company logo
1 of 43
Download to read offline
Ruby Talk – An Introduction to




          Premshree Pillai
        premshree@livejournal.com
Scope of Talk
        What this talk is and what it isn’t
        Me, myself
        What is?
        Why use?
        How to? (a quick run through the syntax)
        Quick comparisons (with Perl and Python)
        Resources


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   2
Purpose

What this talk is?
 Get you interested
 Get you started with Ruby
What it isn’t?
 Not a tutorial



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   3
Who am I?

(or why should you listen to me)

        21/male/single :)
        Technology consultant
        Freelance writer since 2001
        Perl/Python/Ruby/REBOL hacker


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   4
History (Ruby’s, not mine)

      Created (in Japan) by Yukihiro
     Matsumoto, popularly called Matz
      Named as “Ruby” to reflect its Perl
     hertitage
      Released to the public in 1995
      Licensed under GPL or Ruby terms


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   5
What the heck is Ruby?

      An object-oriented “scripting” language
      As powerful as Perl; simpler, better OO
      The simplicity of Python
      Follows the principle of “Least
     Surprise” – What You Expect Is What
     You Get


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   6
Where can you use Ruby?

        System (n/w, RegExps)
        Web programming (using CGI)
        Agents, crawlers
        DB programming (using DBI)
        GUI (Tk, RubyMagick)



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   7
General Features

        High level language
        True OO (everything’s an object!)
        Interpreted
        Portable
        Low learning curve

A quick scan thro’ the syntax
Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   8
Running Ruby

        From the command line:
               ruby file.rb
      Windows binary comes bundled with
     Scintilla




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   9
Basic stuff
print 'Hello, world!'

p 'Hello, world!' # prints with
  newline

my_var = gets # get input



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   10
Operators

            (addition)
         +
         - (subtraction/negation)
         * (multiplication)
         / (division)
         % (modulus)
         ** (exponentiation)


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   11
Operators (contd.)
         ==
         <=> (returns -1, 0 or 1)
         <, <=, >=, >
         =~ (matching)
         eql? (test of equality of type and
     values)


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   12
Operators (contd.)

        ++ and -- are not reserved operators
        Use += and +-




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   13
Logical Operators
         and
         or
         not




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   14
Typing

        Dynamic typed
        Type checking at run-time
        Strong typed




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   15
Basic Data Types

        Integers and floats
        Strings
        Ranges
        Arrays
        Hashes



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   16
Strings
my_str = 'whatever'
my_str = quot;blah, blahquot;

my_str.split(quot;,quot;)[0].split(quot;quot;)[2] * 3




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   17
Ranges

        Inclusive range
               my_range = 1 .. 3
               my_range = 'abc' .. 'abf'
        Non-inclusive range
               my_range = 1 … 5
               my_range = 'abc' … 'abf'



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   18
Arrays
         my_array = [1, 2, 3]
        Common methods:
     my_array.length
     my_array << 4
     my_array[0], etc.




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   19
Hashes
        my_hash = {
            'desc' => {'color' => 'blue',},
            1       => [1, 2, 3]
        }
        print my_hash['desc']['color']
        will return
        blue




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   20
Hashes (contd.)

        Common methods:
               my_hash.keys
               my_hash.values




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   21
Data Type Conversion

        Converting to an Array:
               var_data_type.to_a
        Converting to an String:
               var_data_type.to_s
        More (guess!):
               var_data_type.to_i
               var_data_type.to_f
Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   22
Everything's an Object

      Methods can be applied to data
     directly – not just on variables holding
     data
      Example:
         5.to_s will return quot;5quot;




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   23
Code Blocks

        Code blocks may use braces ( { } ) or
     do/end




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   24
Code Blocks (contd.)

        Example
               def my_print(what)
                   print what
               end
      You cannot use braces for function
     blocks


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   25
If Statement
     if expression
        code block
     elsif (expression)
        code block
     else
        code block
     end


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   26
While Statement
        while expression
          code block
        end
        Example:
          count = 1
          while count < 10
               print count
               count += 1
          end

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   27
For Loop
         for variable_name in range
           code block
         end
        Example:
               for count in 0..2
                   print count
               end


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   28
Iterators
        array_or_range = value
        array_or_range.each { |x|
          print x
        }
        Example:
               my_range = 1..5
               my_range.each { |x|
                    print x
               }

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   29
Functions

        Functions begin with the keyword def
               def function_name([args])
                   code block
               end
        Example:
               def print_name(name='Ruby')
                   print name
               end
Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   30
OO Ruby
      Classes are containers for static data
     members and functions
      Declared using the class keyword. All class
     names should begin with a capital letter
      Constructor declared using the initialize
     keyword
      Class variables precede with an “@”
      Objects created using the new method

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   31
Example class
  class My_class
      def initialize(arg1, arg2)
           @arg1 = arg1
           @arg2 = arg1
      end
      def print_arg1()
           print @arg1
      end
      def print_foo()
           print quot;I Love Ruby!quot;
      end
     private
      def print_arg2()
           print @arg2
      end
  end

  my_object = My_class.new(2, 3)
  my_object.print_arg1
  my_object.print_arg2 # will cause an exception


Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   32
Inheritance
class Derived_class < My_class
  def initialize()
      @arg = quot;I Love Ruby!quot;
  end
  def print_arg()
      print @arg
  end
end

my_object = Derived_class.new
my_object.print_foo
Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   33
Notes on OO Ruby

      Access specifiers: public,
     protected, private
      Multiple inheritance not possible




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   34
Ruby modules
require 'net/http'


                               superclass


                                                   subclass



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   35
Advanced topics

        Regular expressions
        Network programming
        MT programming
        GUI programming (using Tk)
        Web programming



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   36
Now what?
What you can do now?
        Get your hands dirty with Ruby
        Write simple Ruby programs

What you have to do?
        Explore Ruby modules
        Find a problem, and Ruby it!

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   37
Perl compared to Ruby
        Complicated OO
        Cryptic code

(Ruby is often called “A Better Perl”)




PS: Don’t kill me!

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   38
Python compared to Ruby
        Incomplete OO
        Instance variables require self.var
        No class method
        No true GC (uses ref counting)
        Not suitable for one-liners


PS: Don’t kill me!

Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   39
Resources
     Ruby Home Page
     http://www.ruby-lang.org/en/
     Programming Ruby
     http://www.rubycentral.com/book/
     RubyGarden
     http://www.rubygarden.org/ruby
     Ruby Application Archive (RAA)
     http://raa.ruby-lang.org/
Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   40
Resources (contd.)

     RubyForge
     http://rubyforge.org/
     ruby-talk

     http://blade.nagaokaut.ac.jp/ruby/ruby-talk



Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   41
If God did OOP, he’d probably do it in
Python; He’s now considering switching
               to Ruby!




 Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   42
Thank you!
                                   Questions?




Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004   43

More Related Content

What's hot

New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_viNico Ludwig
 
Ekon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsEkon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsArnaud Bouchez
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in RubyRoss Lawley
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHBhavsingh Maloth
 
Dart the better Javascript 2015
Dart the better Javascript 2015Dart the better Javascript 2015
Dart the better Javascript 2015Jorg Janke
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKonstantin Sorokin
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1Ahmet Bulut
 
The dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with RubyThe dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with RubyEvgeny Garlukovich
 
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...DaeHyun Sung
 
I Know Kung Fu - Juggling Java Bytecode
I Know Kung Fu - Juggling Java BytecodeI Know Kung Fu - Juggling Java Bytecode
I Know Kung Fu - Juggling Java BytecodeAlexander Shopov
 
Introduction to llvm
Introduction to llvmIntroduction to llvm
Introduction to llvmTao He
 
Getting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeGetting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeLihang Li
 
Lifting The Veil - Reading Java Bytecode During Lunchtime
Lifting The Veil - Reading Java Bytecode During LunchtimeLifting The Veil - Reading Java Bytecode During Lunchtime
Lifting The Veil - Reading Java Bytecode During LunchtimeAlexander Shopov
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
 

What's hot (19)

New c sharp4_features_part_vi
New c sharp4_features_part_viNew c sharp4_features_part_vi
New c sharp4_features_part_vi
 
Ekon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side NotificationsEkon25 mORMot 2 Server-Side Notifications
Ekon25 mORMot 2 Server-Side Notifications
 
Metaprogramming in Ruby
Metaprogramming in RubyMetaprogramming in Ruby
Metaprogramming in Ruby
 
2CPP02 - C++ Primer
2CPP02 - C++ Primer2CPP02 - C++ Primer
2CPP02 - C++ Primer
 
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT VIII BY BHAVSINGH MALOTH
 
Dart the better Javascript 2015
Dart the better Javascript 2015Dart the better Javascript 2015
Dart the better Javascript 2015
 
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program DevelopmenKostis Sagonas: Cool Tools for Modern Erlang Program Developmen
Kostis Sagonas: Cool Tools for Modern Erlang Program Developmen
 
Protocol Buffer.ppt
Protocol Buffer.pptProtocol Buffer.ppt
Protocol Buffer.ppt
 
Ruby golightly
Ruby golightlyRuby golightly
Ruby golightly
 
Programming with Python: Week 1
Programming with Python: Week 1Programming with Python: Week 1
Programming with Python: Week 1
 
C++ programming
C++ programmingC++ programming
C++ programming
 
The dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with RubyThe dark side of Ruby, or Learn functional programming with Ruby
The dark side of Ruby, or Learn functional programming with Ruby
 
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
[LibreOffice Asia Conference 2019] CJK Issues on LibreOffice(based on Korean ...
 
I Know Kung Fu - Juggling Java Bytecode
I Know Kung Fu - Juggling Java BytecodeI Know Kung Fu - Juggling Java Bytecode
I Know Kung Fu - Juggling Java Bytecode
 
Introduction to llvm
Introduction to llvmIntroduction to llvm
Introduction to llvm
 
Getting started with Linux and Python by Caffe
Getting started with Linux and Python by CaffeGetting started with Linux and Python by Caffe
Getting started with Linux and Python by Caffe
 
Dancing with dalvik
Dancing with dalvikDancing with dalvik
Dancing with dalvik
 
Lifting The Veil - Reading Java Bytecode During Lunchtime
Lifting The Veil - Reading Java Bytecode During LunchtimeLifting The Veil - Reading Java Bytecode During Lunchtime
Lifting The Veil - Reading Java Bytecode During Lunchtime
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 

Viewers also liked

citigroup Financial Supplement July 18, 2008 - Second Quarter
citigroup Financial Supplement July 18, 2008 - Second Quartercitigroup Financial Supplement July 18, 2008 - Second Quarter
citigroup Financial Supplement July 18, 2008 - Second QuarterQuarterlyEarningsReports
 
citigroup October 19, 2006 - Third Quarter Financial Supplement
citigroup October 19, 2006 - Third Quarter Financial Supplementcitigroup October 19, 2006 - Third Quarter Financial Supplement
citigroup October 19, 2006 - Third Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup January 20, 2006 - Fourth Quarter Press Release
citigroup January 20, 2006 - Fourth Quarter Press Releasecitigroup January 20, 2006 - Fourth Quarter Press Release
citigroup January 20, 2006 - Fourth Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup January 19, 2007 - Fourth Quarter Financial Supplement
citigroup January 19, 2007 - Fourth Quarter Financial Supplementcitigroup January 19, 2007 - Fourth Quarter Financial Supplement
citigroup January 19, 2007 - Fourth Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup April 17, 2000 - First Quarter Financial Supplement
citigroup April 17, 2000 - First Quarter Financial Supplementcitigroup April 17, 2000 - First Quarter Financial Supplement
citigroup April 17, 2000 - First Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup January 17, 2002 - Fourth Quarter Financial Supplement
citigroup January 17, 2002 - Fourth Quarter  Financial Supplementcitigroup January 17, 2002 - Fourth Quarter  Financial Supplement
citigroup January 17, 2002 - Fourth Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup July 19, 2000 - Second Quarter Financial Supplement
citigroup July 19, 2000 - Second Quarter Financial Supplementcitigroup July 19, 2000 - Second Quarter Financial Supplement
citigroup July 19, 2000 - Second Quarter Financial SupplementQuarterlyEarningsReports
 
04-The Fur Trade in the 17th and 18th Centuries
04-The Fur Trade in the 17th and 18th Centuries04-The Fur Trade in the 17th and 18th Centuries
04-The Fur Trade in the 17th and 18th Centuriescaronc
 

Viewers also liked (16)

Ebay News 2005 10 19 Earnings
Ebay News 2005 10 19 EarningsEbay News 2005 10 19 Earnings
Ebay News 2005 10 19 Earnings
 
2001 Financial Section
2001 Financial Section2001 Financial Section
2001 Financial Section
 
Ebay News 2004 10 20 Earnings
Ebay News 2004 10 20 EarningsEbay News 2004 10 20 Earnings
Ebay News 2004 10 20 Earnings
 
Ebay News 2000 1 25 Earnings
Ebay News 2000 1 25 EarningsEbay News 2000 1 25 Earnings
Ebay News 2000 1 25 Earnings
 
citigroup Financial Supplement July 18, 2008 - Second Quarter
citigroup Financial Supplement July 18, 2008 - Second Quartercitigroup Financial Supplement July 18, 2008 - Second Quarter
citigroup Financial Supplement July 18, 2008 - Second Quarter
 
citigroup October 19, 2006 - Third Quarter Financial Supplement
citigroup October 19, 2006 - Third Quarter Financial Supplementcitigroup October 19, 2006 - Third Quarter Financial Supplement
citigroup October 19, 2006 - Third Quarter Financial Supplement
 
2007 Q3 Google Earnings Slides
2007 Q3 Google Earnings Slides2007 Q3 Google Earnings Slides
2007 Q3 Google Earnings Slides
 
Ebay News 2003 10 16 Earnings
Ebay News 2003 10 16 EarningsEbay News 2003 10 16 Earnings
Ebay News 2003 10 16 Earnings
 
citigroup January 20, 2006 - Fourth Quarter Press Release
citigroup January 20, 2006 - Fourth Quarter Press Releasecitigroup January 20, 2006 - Fourth Quarter Press Release
citigroup January 20, 2006 - Fourth Quarter Press Release
 
E Bay Finalq32008 Earnings Release
E Bay Finalq32008 Earnings ReleaseE Bay Finalq32008 Earnings Release
E Bay Finalq32008 Earnings Release
 
citigroup January 19, 2007 - Fourth Quarter Financial Supplement
citigroup January 19, 2007 - Fourth Quarter Financial Supplementcitigroup January 19, 2007 - Fourth Quarter Financial Supplement
citigroup January 19, 2007 - Fourth Quarter Financial Supplement
 
citigroup April 17, 2000 - First Quarter Financial Supplement
citigroup April 17, 2000 - First Quarter Financial Supplementcitigroup April 17, 2000 - First Quarter Financial Supplement
citigroup April 17, 2000 - First Quarter Financial Supplement
 
citigroup January 17, 2002 - Fourth Quarter Financial Supplement
citigroup January 17, 2002 - Fourth Quarter  Financial Supplementcitigroup January 17, 2002 - Fourth Quarter  Financial Supplement
citigroup January 17, 2002 - Fourth Quarter Financial Supplement
 
citigroup Qer084
citigroup Qer084citigroup Qer084
citigroup Qer084
 
citigroup July 19, 2000 - Second Quarter Financial Supplement
citigroup July 19, 2000 - Second Quarter Financial Supplementcitigroup July 19, 2000 - Second Quarter Financial Supplement
citigroup July 19, 2000 - Second Quarter Financial Supplement
 
04-The Fur Trade in the 17th and 18th Centuries
04-The Fur Trade in the 17th and 18th Centuries04-The Fur Trade in the 17th and 18th Centuries
04-The Fur Trade in the 17th and 18th Centuries
 

Similar to Ebay News 2000 10 19 Earnings

Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Mark Menard
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Rormyuser
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Muhammad Haseeb Shahid
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9sagaroceanic11
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9sagaroceanic11
 
Jerry Shea Resume And Addendum 5 2 09
Jerry  Shea Resume And Addendum 5 2 09Jerry  Shea Resume And Addendum 5 2 09
Jerry Shea Resume And Addendum 5 2 09gshea11
 
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi PetangMajlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi PetangImsamad
 
Agapornis Mansos - www.criadourosudica.blogspot.com
Agapornis Mansos - www.criadourosudica.blogspot.comAgapornis Mansos - www.criadourosudica.blogspot.com
Agapornis Mansos - www.criadourosudica.blogspot.comAntonio Silva
 
Paulo Freire Pedagpogia 1
Paulo Freire Pedagpogia 1Paulo Freire Pedagpogia 1
Paulo Freire Pedagpogia 1Alejandra Perez
 
Washington Practitioners Significant Changes To Rpc 1.5
Washington Practitioners Significant Changes To Rpc 1.5Washington Practitioners Significant Changes To Rpc 1.5
Washington Practitioners Significant Changes To Rpc 1.5Oregon Law Practice Management
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorialknoppix
 

Similar to Ebay News 2000 10 19 Earnings (20)

Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 
Intro for RoR
Intro for RoRIntro for RoR
Intro for RoR
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Ror
 
Ruby
RubyRuby
Ruby
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
Intro To Ror
Intro To RorIntro To Ror
Intro To Ror
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
 
Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9Rubyforjavaprogrammers 1210167973516759-9
Rubyforjavaprogrammers 1210167973516759-9
 
l-rubysocks-a4
l-rubysocks-a4l-rubysocks-a4
l-rubysocks-a4
 
l-rubysocks-a4
l-rubysocks-a4l-rubysocks-a4
l-rubysocks-a4
 
MMBJ Shanzhai Culture
MMBJ Shanzhai CultureMMBJ Shanzhai Culture
MMBJ Shanzhai Culture
 
Jerry Shea Resume And Addendum 5 2 09
Jerry  Shea Resume And Addendum 5 2 09Jerry  Shea Resume And Addendum 5 2 09
Jerry Shea Resume And Addendum 5 2 09
 
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi PetangMajlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
Majlis Persaraan Pn.Hjh.Normah bersama guru-guru Sesi Petang
 
Agapornis Mansos - www.criadourosudica.blogspot.com
Agapornis Mansos - www.criadourosudica.blogspot.comAgapornis Mansos - www.criadourosudica.blogspot.com
Agapornis Mansos - www.criadourosudica.blogspot.com
 
LoteríA Correcta
LoteríA CorrectaLoteríA Correcta
LoteríA Correcta
 
Paulo Freire Pedagpogia 1
Paulo Freire Pedagpogia 1Paulo Freire Pedagpogia 1
Paulo Freire Pedagpogia 1
 
Washington Practitioners Significant Changes To Rpc 1.5
Washington Practitioners Significant Changes To Rpc 1.5Washington Practitioners Significant Changes To Rpc 1.5
Washington Practitioners Significant Changes To Rpc 1.5
 
Ruby tutorial
Ruby tutorialRuby tutorial
Ruby tutorial
 
Ruby Hell Yeah
Ruby Hell YeahRuby Hell Yeah
Ruby Hell Yeah
 

More from QuarterlyEarningsReports

citigroup April 17, 2000 - First Quarter Press Release
citigroup April 17, 2000 - First Quarter Press Releasecitigroup April 17, 2000 - First Quarter Press Release
citigroup April 17, 2000 - First Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup July 19, 2000 - Second Quarter Press Release
citigroup  July 19, 2000 - Second Quarter Press Releasecitigroup  July 19, 2000 - Second Quarter Press Release
citigroup July 19, 2000 - Second Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup October 17, 2000 - Third Quarter Press Release
citigroup October 17, 2000 - Third Quarter Press Releasecitigroup October 17, 2000 - Third Quarter Press Release
citigroup October 17, 2000 - Third Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup January 16, 2001 - Fourth Quarter Financial Supplement
citigroup January 16, 2001 - Fourth Quarter Financial Supplementcitigroup January 16, 2001 - Fourth Quarter Financial Supplement
citigroup January 16, 2001 - Fourth Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup January 16, 2001 - Fourth Quarter Press Release
citigroup January 16, 2001 - Fourth Quarter Press Releasecitigroup January 16, 2001 - Fourth Quarter Press Release
citigroup January 16, 2001 - Fourth Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup April 16, 2001 - First Quarter Financial Supplement
citigroup April 16, 2001 - First Quarter  Financial Supplementcitigroup April 16, 2001 - First Quarter  Financial Supplement
citigroup April 16, 2001 - First Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup April 16, 2001 - First Quarter Press Release
citigroup April 16, 2001 - First Quarter Press Releasecitigroup April 16, 2001 - First Quarter Press Release
citigroup April 16, 2001 - First Quarter Press ReleaseQuarterlyEarningsReports
 
citi July 16, 2001 - Second Quarter Financial Supplement
citi July 16, 2001 - Second Quarter Financial Supplementciti July 16, 2001 - Second Quarter Financial Supplement
citi July 16, 2001 - Second Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup July 16, 2001 - Second Quarter Press Release
citigroup July 16, 2001 - Second Quarter Press Releasecitigroup July 16, 2001 - Second Quarter Press Release
citigroup July 16, 2001 - Second Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup October 17, 2001 - Third Quarter Financial Supplement
citigroup October 17, 2001 - Third Quarter  Financial Supplementcitigroup October 17, 2001 - Third Quarter  Financial Supplement
citigroup October 17, 2001 - Third Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup October 17, 2001 - Third Quarter Press Release
citigroup October 17, 2001 - Third Quarter Press Releasecitigroup October 17, 2001 - Third Quarter Press Release
citigroup October 17, 2001 - Third Quarter Press ReleaseQuarterlyEarningsReports
 
citigroup Financial Supplement Reclassifications for 1Q05
citigroup Financial Supplement Reclassifications for 1Q05citigroup Financial Supplement Reclassifications for 1Q05
citigroup Financial Supplement Reclassifications for 1Q05QuarterlyEarningsReports
 
citigroup April 15, 2002 - First Quarter Financial Supplement
citigroup April 15, 2002 - First Quarter Financial Supplementcitigroup April 15, 2002 - First Quarter Financial Supplement
citigroup April 15, 2002 - First Quarter Financial SupplementQuarterlyEarningsReports
 
citigroup April 15, 2002 - First Quarter Press Release
citigroup April 15, 2002 - First Quarter Press Releasecitigroup April 15, 2002 - First Quarter Press Release
citigroup April 15, 2002 - First Quarter Press ReleaseQuarterlyEarningsReports
 

More from QuarterlyEarningsReports (20)

citigroup April 17, 2000 - First Quarter Press Release
citigroup April 17, 2000 - First Quarter Press Releasecitigroup April 17, 2000 - First Quarter Press Release
citigroup April 17, 2000 - First Quarter Press Release
 
citigroup Financial Supplement
citigroup Financial Supplementcitigroup Financial Supplement
citigroup Financial Supplement
 
citigroup July 19, 2000 - Second Quarter Press Release
citigroup  July 19, 2000 - Second Quarter Press Releasecitigroup  July 19, 2000 - Second Quarter Press Release
citigroup July 19, 2000 - Second Quarter Press Release
 
citigroup Financial Supplement
citigroup Financial Supplementcitigroup Financial Supplement
citigroup Financial Supplement
 
citigroup Financial Supplement
citigroup Financial Supplementcitigroup Financial Supplement
citigroup Financial Supplement
 
citigroup October 17, 2000 - Third Quarter Press Release
citigroup October 17, 2000 - Third Quarter Press Releasecitigroup October 17, 2000 - Third Quarter Press Release
citigroup October 17, 2000 - Third Quarter Press Release
 
citigroup January 16, 2001 - Fourth Quarter Financial Supplement
citigroup January 16, 2001 - Fourth Quarter Financial Supplementcitigroup January 16, 2001 - Fourth Quarter Financial Supplement
citigroup January 16, 2001 - Fourth Quarter Financial Supplement
 
citigroup January 16, 2001 - Fourth Quarter Press Release
citigroup January 16, 2001 - Fourth Quarter Press Releasecitigroup January 16, 2001 - Fourth Quarter Press Release
citigroup January 16, 2001 - Fourth Quarter Press Release
 
citigroup Financial Supplement
citigroup Financial Supplementcitigroup Financial Supplement
citigroup Financial Supplement
 
citigroup April 16, 2001 - First Quarter Financial Supplement
citigroup April 16, 2001 - First Quarter  Financial Supplementcitigroup April 16, 2001 - First Quarter  Financial Supplement
citigroup April 16, 2001 - First Quarter Financial Supplement
 
citigroup April 16, 2001 - First Quarter Press Release
citigroup April 16, 2001 - First Quarter Press Releasecitigroup April 16, 2001 - First Quarter Press Release
citigroup April 16, 2001 - First Quarter Press Release
 
citigroup Financial Supplement
citigroup Financial Supplementcitigroup Financial Supplement
citigroup Financial Supplement
 
citi July 16, 2001 - Second Quarter Financial Supplement
citi July 16, 2001 - Second Quarter Financial Supplementciti July 16, 2001 - Second Quarter Financial Supplement
citi July 16, 2001 - Second Quarter Financial Supplement
 
citigroup July 16, 2001 - Second Quarter Press Release
citigroup July 16, 2001 - Second Quarter Press Releasecitigroup July 16, 2001 - Second Quarter Press Release
citigroup July 16, 2001 - Second Quarter Press Release
 
citigroupFinancial Supplement
citigroupFinancial SupplementcitigroupFinancial Supplement
citigroupFinancial Supplement
 
citigroup October 17, 2001 - Third Quarter Financial Supplement
citigroup October 17, 2001 - Third Quarter  Financial Supplementcitigroup October 17, 2001 - Third Quarter  Financial Supplement
citigroup October 17, 2001 - Third Quarter Financial Supplement
 
citigroup October 17, 2001 - Third Quarter Press Release
citigroup October 17, 2001 - Third Quarter Press Releasecitigroup October 17, 2001 - Third Quarter Press Release
citigroup October 17, 2001 - Third Quarter Press Release
 
citigroup Financial Supplement Reclassifications for 1Q05
citigroup Financial Supplement Reclassifications for 1Q05citigroup Financial Supplement Reclassifications for 1Q05
citigroup Financial Supplement Reclassifications for 1Q05
 
citigroup April 15, 2002 - First Quarter Financial Supplement
citigroup April 15, 2002 - First Quarter Financial Supplementcitigroup April 15, 2002 - First Quarter Financial Supplement
citigroup April 15, 2002 - First Quarter Financial Supplement
 
citigroup April 15, 2002 - First Quarter Press Release
citigroup April 15, 2002 - First Quarter Press Releasecitigroup April 15, 2002 - First Quarter Press Release
citigroup April 15, 2002 - First Quarter Press Release
 

Recently uploaded

Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfmuskan1121w
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc.../:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...lizamodels9
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Non Text Magic Studio Magic Design for Presentations L&P.pptx
Non Text Magic Studio Magic Design for Presentations L&P.pptxNon Text Magic Studio Magic Design for Presentations L&P.pptx
Non Text Magic Studio Magic Design for Presentations L&P.pptxAbhayThakur200703
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneVIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneCall girls in Ahmedabad High profile
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdfOrient Homes
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 

Recently uploaded (20)

Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdf
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.Eni 2024 1Q Results - 24.04.24 business.
Eni 2024 1Q Results - 24.04.24 business.
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc.../:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Non Text Magic Studio Magic Design for Presentations L&P.pptx
Non Text Magic Studio Magic Design for Presentations L&P.pptxNon Text Magic Studio Magic Design for Presentations L&P.pptx
Non Text Magic Studio Magic Design for Presentations L&P.pptx
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service PuneVIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
VIP Call Girls Pune Kirti 8617697112 Independent Escort Service Pune
 
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Greater Noida ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Catalogue ONG NUOC PPR DE NHAT .pdf
Catalogue ONG NUOC PPR DE NHAT      .pdfCatalogue ONG NUOC PPR DE NHAT      .pdf
Catalogue ONG NUOC PPR DE NHAT .pdf
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 

Ebay News 2000 10 19 Earnings

  • 1. Ruby Talk – An Introduction to Premshree Pillai premshree@livejournal.com
  • 2. Scope of Talk What this talk is and what it isn’t Me, myself What is? Why use? How to? (a quick run through the syntax) Quick comparisons (with Perl and Python) Resources Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 2
  • 3. Purpose What this talk is? Get you interested Get you started with Ruby What it isn’t? Not a tutorial Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 3
  • 4. Who am I? (or why should you listen to me) 21/male/single :) Technology consultant Freelance writer since 2001 Perl/Python/Ruby/REBOL hacker Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 4
  • 5. History (Ruby’s, not mine) Created (in Japan) by Yukihiro Matsumoto, popularly called Matz Named as “Ruby” to reflect its Perl hertitage Released to the public in 1995 Licensed under GPL or Ruby terms Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 5
  • 6. What the heck is Ruby? An object-oriented “scripting” language As powerful as Perl; simpler, better OO The simplicity of Python Follows the principle of “Least Surprise” – What You Expect Is What You Get Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 6
  • 7. Where can you use Ruby? System (n/w, RegExps) Web programming (using CGI)  Agents, crawlers DB programming (using DBI) GUI (Tk, RubyMagick) Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 7
  • 8. General Features High level language True OO (everything’s an object!) Interpreted Portable Low learning curve A quick scan thro’ the syntax Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 8
  • 9. Running Ruby From the command line: ruby file.rb Windows binary comes bundled with Scintilla Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 9
  • 10. Basic stuff print 'Hello, world!' p 'Hello, world!' # prints with newline my_var = gets # get input Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 10
  • 11. Operators (addition) + - (subtraction/negation) * (multiplication) / (division) % (modulus) ** (exponentiation) Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 11
  • 12. Operators (contd.) == <=> (returns -1, 0 or 1) <, <=, >=, > =~ (matching) eql? (test of equality of type and values) Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 12
  • 13. Operators (contd.) ++ and -- are not reserved operators Use += and +- Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 13
  • 14. Logical Operators and or not Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 14
  • 15. Typing Dynamic typed  Type checking at run-time Strong typed Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 15
  • 16. Basic Data Types Integers and floats Strings Ranges Arrays Hashes Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 16
  • 17. Strings my_str = 'whatever' my_str = quot;blah, blahquot; my_str.split(quot;,quot;)[0].split(quot;quot;)[2] * 3 Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 17
  • 18. Ranges Inclusive range my_range = 1 .. 3 my_range = 'abc' .. 'abf' Non-inclusive range my_range = 1 … 5 my_range = 'abc' … 'abf' Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 18
  • 19. Arrays my_array = [1, 2, 3] Common methods: my_array.length my_array << 4 my_array[0], etc. Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 19
  • 20. Hashes my_hash = { 'desc' => {'color' => 'blue',}, 1 => [1, 2, 3] } print my_hash['desc']['color'] will return blue Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 20
  • 21. Hashes (contd.) Common methods: my_hash.keys my_hash.values Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 21
  • 22. Data Type Conversion Converting to an Array: var_data_type.to_a Converting to an String: var_data_type.to_s More (guess!): var_data_type.to_i var_data_type.to_f Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 22
  • 23. Everything's an Object Methods can be applied to data directly – not just on variables holding data Example: 5.to_s will return quot;5quot; Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 23
  • 24. Code Blocks Code blocks may use braces ( { } ) or do/end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 24
  • 25. Code Blocks (contd.) Example def my_print(what) print what end You cannot use braces for function blocks Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 25
  • 26. If Statement if expression code block elsif (expression) code block else code block end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 26
  • 27. While Statement while expression code block end Example: count = 1 while count < 10 print count count += 1 end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 27
  • 28. For Loop for variable_name in range code block end Example: for count in 0..2 print count end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 28
  • 29. Iterators array_or_range = value array_or_range.each { |x| print x } Example: my_range = 1..5 my_range.each { |x| print x } Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 29
  • 30. Functions Functions begin with the keyword def def function_name([args]) code block end Example: def print_name(name='Ruby') print name end Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 30
  • 31. OO Ruby Classes are containers for static data members and functions Declared using the class keyword. All class names should begin with a capital letter Constructor declared using the initialize keyword Class variables precede with an “@” Objects created using the new method Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 31
  • 32. Example class class My_class def initialize(arg1, arg2) @arg1 = arg1 @arg2 = arg1 end def print_arg1() print @arg1 end def print_foo() print quot;I Love Ruby!quot; end private def print_arg2() print @arg2 end end my_object = My_class.new(2, 3) my_object.print_arg1 my_object.print_arg2 # will cause an exception Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 32
  • 33. Inheritance class Derived_class < My_class def initialize() @arg = quot;I Love Ruby!quot; end def print_arg() print @arg end end my_object = Derived_class.new my_object.print_foo Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 33
  • 34. Notes on OO Ruby Access specifiers: public, protected, private Multiple inheritance not possible Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 34
  • 35. Ruby modules require 'net/http' superclass subclass Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 35
  • 36. Advanced topics Regular expressions Network programming MT programming GUI programming (using Tk) Web programming Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 36
  • 37. Now what? What you can do now? Get your hands dirty with Ruby Write simple Ruby programs What you have to do? Explore Ruby modules Find a problem, and Ruby it! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 37
  • 38. Perl compared to Ruby Complicated OO Cryptic code (Ruby is often called “A Better Perl”) PS: Don’t kill me! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 38
  • 39. Python compared to Ruby Incomplete OO Instance variables require self.var No class method No true GC (uses ref counting) Not suitable for one-liners PS: Don’t kill me! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 39
  • 40. Resources Ruby Home Page http://www.ruby-lang.org/en/ Programming Ruby http://www.rubycentral.com/book/ RubyGarden http://www.rubygarden.org/ruby Ruby Application Archive (RAA) http://raa.ruby-lang.org/ Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 40
  • 41. Resources (contd.) RubyForge http://rubyforge.org/ ruby-talk http://blade.nagaokaut.ac.jp/ruby/ruby-talk Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 41
  • 42. If God did OOP, he’d probably do it in Python; He’s now considering switching to Ruby! Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 42
  • 43. Thank you! Questions? Ruby Talk - An Introduction to Ruby -- Linux Bangalore/2004 43