ruby programming

13
SEMINAR ON RUBY PROGRAMMING Presented by :- Kartik N. Kalpande.

Upload: kartik-kalpande-patil

Post on 15-Feb-2017

88 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Ruby programming

SEMINAR ON RUBY PROGRAMMING

Presented by :-Kartik N. Kalpande.

Page 2: Ruby programming

CONTENTS Introduction History Overview of ruby programing Application and tool needed for Ruby Different from other language Advantages of Ruby programing Disadvantages of programing Example of Ruby programing Conclusion

Page 3: Ruby programming

INTRODUCTIONRuby was created by Yukihiro

Matsumoto, or "Matz", in Japan in the mid 1990's.

Page 4: Ruby programming

HISTORY Born Feb 24, 1993 – Yukihiro ”Matz” Matsumoto Ruby 0.95 – announced Dec 21, 1995 – OO, Inheritance, iterators, exception handling, garbage

collection Ruby 1.0 – released Dec 25, 1996 Ruby 1.3 – 1999 – After its release an English ”Ruby” mailing list was created Ruby on Rails – 2005 – MVC web framework coded with Ruby Ruby 1.9.1 – Latest version

Page 5: Ruby programming

OVERVIEW OF RUBY PROGRAMMING Ruby – Scripting language, dynamic and object

oriented Allows rapid development and rapid prototypes

of software Consists of useful string operations and regular

expressions Everything in Ruby is an object Has automatic garbage collection Instant feedback when developing Multiple OS support and open source

Page 6: Ruby programming

TOOLS NEEDED FOR RUBY

The Ruby interpreter

A text editor such as Notepad++, Scite or

Vim.Word processors such as Wordpad or

Microsoft Word are not suitable.

Command-line access.

Page 7: Ruby programming

DIFFERENT FROM OTHER LANGUAGE

Objects are strongly typed (and variable names themselves have no type at all).

No pointers ,no typedefs, sizeof, nor enums. There are no header files. There’s no #define. Just use constants instead.

Page 8: Ruby programming

PROGRAM FOR FACTORIAL NO .

def fact(n)

  if n == 0

    1

  else

    n * fact(n-1)

  end

end

puts fact(ARGV[0].to_i)

Page 9: Ruby programming

ADVANTAGES

Clean code. Easy to learn. Documention and support.Open Source. Object oriented.

Page 10: Ruby programming

DISADVANTAGES

Ruby's development and updates are

slower.

It is a slower programing language

Page 11: Ruby programming

CONCLUSION Ruby is an object oriented language and the object oriented

features are used throughout. Ruby is that doesn’t require a lot of

extra punctuation. Compared to Java, Ruby is streamlined, with

less code required to create basic structures such as data fields.

Ruby is a modern language that makes it easy to use high-level

abstractions such as metaprogramming.

Page 12: Ruby programming

REFERENCES http://www.fincher.org/tips/Languages/Ruby/ http://www.rubylang. org/en/about/ http://www.rubylang. org/en/documentation/quickstart/ http://en.wikipedia.org/wiki/Ruby_

%28programming_language%29 http://articles.sitepoint.com/article/

learnrubyonrails

Page 13: Ruby programming

THANK YOU!