Your SlideShare is downloading. ×
0
Socket classes Ruby has a rich and diverse set of sockets classes. These classes range from the standard Socket class to m...
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...
SMTP Class E-mail is still one of the most important and popular technologies used online. require 'net/smtp'  user_from =...
Ruby on Rails Introduction <ul><li>Ruby on Rails, often shortened to Rails or RoR. </li></ul><ul><li>Open source web appli...
Upcoming SlideShare
Loading in...5
×

Ruby

730

Published on

* 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

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

  • Be the first to like this

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

No notes for slide

Transcript of "Ruby"

  1. 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. 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. 3. SMTP Class E-mail is still one of the most important and popular technologies used online. require 'net/smtp' user_from = &quot;superman@world.com&quot; user_to = &quot;batman@world.com&quot; msg= “How are you?&quot; # handling exceptions begin Net::SMTP.start('localhost', 25) do |smtpclient| smtpclient.send_message(msg, user_from, user_to) end rescue Exception => e print &quot;Exception occured: &quot; + e end The Net::SMTP library provides functionality to send internet mail via SMTP, the Simple Mail Transfer Protocol.
  4. 4. Ruby on Rails Introduction <ul><li>Ruby on Rails, often shortened to Rails or RoR. </li></ul><ul><li>Open source web application framework for the Ruby programming language. </li></ul><ul><li>Written in Ruby by David Heinemeier Hansson. </li></ul><ul><li>You could develop a web application at least ten times faster with Rails than you could with a typical Java framework. </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×