Ruby
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Ruby

on

  • 1,179 views

* About this Tutorial...

* About this Tutorial
* Hello World
* Loops
* Branching
* Containers
* Arrays
* Hashes
* Strings
* Regular Expressions
* Subroutines
* Exceptions
* Terminal IO
* File IO
* How OOP is Ruby?
* Object Oriented Programming Concepts
* Simple OOP in Ruby

Statistics

Views

Total Views
1,179
Views on SlideShare
1,179
Embed Views
0

Actions

Likes
0
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ruby Presentation Transcript

  • 1. Socket classes Ruby has a rich and diverse set of sockets classes. These classes range from the standard Socket class to more refined classes that focus on a particular protocol or application type. The class hierarchy of the base sockets classes is as shown below:
  • 2. Most of the classes derive from the IO class. This means that we can use the methods of IO that are so familiar to us. The TCPSocket class supports sockets for the connection-based, reliable Transmission Control Protocol. A helper class for the creation of TCP server sockets is also available in the TCPServer class. To create a stream socket and connect it to a server, the TCPSocket class can be used. All socket classes are part of the standard library (and not part of the core classes), so to use them in your Ruby program, you must first write: require 'socket'
  • 3. SMTP Class E-mail is still one of the most important and popular technologies used online. require 'net/smtp' user_from = "superman@world.com" user_to = "batman@world.com" msg= “How are you?" # handling exceptions begin Net::SMTP.start('localhost', 25) do |smtpclient| smtpclient.send_message(msg, user_from, user_to) end rescue Exception => e print "Exception occured: " + e end The Net::SMTP library provides functionality to send internet mail via SMTP, the Simple Mail Transfer Protocol.
  • 4. Ruby on Rails Introduction
    • Ruby on Rails, often shortened to Rails or RoR.
    • Open source web application framework for the Ruby programming language.
    • Written in Ruby by David Heinemeier Hansson.
    • You could develop a web application at least ten times faster with Rails than you could with a typical Java framework.