Ruby Introduction

345
-1

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
345
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ruby Introduction

  1. 1. RubyProgrammer’s Best FriendD. PrabuRuby On Rails Developer,Spritle Software.
  2. 2. History010203Yukihiro “Matz” MatsumotoFebruary 24, 1993Matz wanted a scripting language that was morepowerful than Perl, and more object-oriented thanPython. Thats why he decided to design his ownlanguage.Perl Java Python Ruby PHP1987 1991 1993 1995
  3. 3. Scripting LanguageA high-level programming language that is interpreted byanother program at runtime rather than compiled by thecomputers processor as other programming languages(such as C and C++) are. Scripting languages, which canbe embedded within HTML, commonly are used to addfunctionality to a Web page.JavaScript, ASP, JSP, PHP, Perl, Tcl and Python areexamples of scripting languages.
  4. 4. Code Sample5.times { print “Ruby! " }
  5. 5. Code Sample5.times { print “Ruby! " }Ruby! Ruby! Ruby! Ruby! Ruby!
  6. 6. ConventionsVarialbes Class Variablename_of_the_product @@current_client_idClass NameTeamPartySymbols:list_Of_itemsInstance Variables@current_client
  7. 7. Everything is an object1.class # => Fixnuma.class # => String:a.class # => Symbolclass RecordendRecord.class # => ClassRecord.new.class # => Record
  8. 8. Method, Class and Invocationdef do_work(task_ref)task_ref.assigned_workendClass Taskdef assigned_workputs “Completed successfully.”endenddo_work(Task.new)MethodClassInvocation
  9. 9. THANKSSPRITLE SOFTWARE
  10. 10. THANKSSPRITLE SOFTWARE

×