Ruby Tutorials

1. Using Proxy to connect to URLs in Ruby

By: Emiley J. : 2009-03-03

Description: Net::HTTP.Proxy creates http proxy class. It has same methods of Net::HTTP but its instances always connect to proxy, instead of given host.


2. header() in Ruby

By: Jeeva : 2009-03-03

Description: Create an HTTP header block as a string


3. out() in Ruby

By: Jeeva : 2009-03-03

Description: Print an HTTP header and body to $DEFAULT_OUTPUT


4. Open and manipulate CSV files in Ruby

By: Vijay : 2009-03-03

Description: To Open a CSV formatted file for reading or writing use open(path, mode, fs = nil, rs = nil, &block)


5. date and time in Ruby

By: Tadayoshi Funaba : 2009-03-03

Description: In common usage, the date is reckoned in years since or before the Common Era (CE/BCE, also known as AD/BC), then as a month and day-of-the-month within the current year. This is known as the Civil Date, and abbreviated as civil in the Date class.


6. SimpleDelegator in Ruby

By: James Edward Gray II and Gavin Sinclair : 2009-03-03

Description: The delegate.rb library provides three different ways to delegate method calls to an object. The easiest to use is SimpleDelegator. Pass an object to the constructor and all methods supported by the object will be delegated. This object can be changed later.


7. What is dRuby?

By: Vijay : 2009-03-03

Description: dRuby is a distributed object system for Ruby. It is written in pure Ruby and uses its own protocol. No add-in services are needed beyond those provided by the Ruby runtime, such as TCP sockets. It does not rely on or interoperate with other distributed object systems such as CORBA, RMI, or .NET.


8. dRuby client/server mode sample program

By: Emiley J. : 2009-03-03

Description: This illustrates setting up a simple client-server drb system. Run the server and client code in different terminals, starting the server code first.


9. Using remote objects under dRuby

By: Jeya : 2009-03-03

Description: This example illustrates returning a reference to an object from a dRuby call. The Logger instances live in the server process. References to them are returned to the client process, where methods can be invoked upon them. These methods are executed in the server process.


10. Security in dRuby

By: Jeya : 2009-03-03

Description: As with all network services, security needs to be considered when using dRuby. By allowing external access to a Ruby object, you are not only allowing outside clients to call the methods you have defined for that object, but by default to execute arbitrary Ruby code on your server.