Ruby
Path Computers    Programming    Ruby
All tutorials in Ruby
Sort By:    Name   Rating   Views  Comments    Date 
Progress Bars with GD2 and Ruby
Submitted 23 June 2008

I went milling about for source for progress bars that would be suitably embedded within a Ruby on Rails application I'm working on and came up with nada. Sure, sure there are lots of bars that have to do with live uploading and whatnot but nothing that grabbed me with the interface I was looking for (call function, return data).

Views: 136 Comments: 0
Difference of Gtk+ and Ruby/Gtk
Submitted 23 June 2008

Hereafter, we discuss the difference between using Gtk+ from C and using Ruby/Gtk

Views: 150 Comments: 0
The Scalability of Ruby
Submitted 23 June 2008

There are lots of reasons to like Ruby. It's a pure object oriented language. The syntax is elegant, and the use of blocks creates a novel feel. Another reason to like Ruby is its scalability. I don't mean scalability in the performance sense, but in regards to how you can code simple Ruby macros to solve small problems and also use Ruby in its object oriented form to support very large or complex...

Views: 122 Comments: 0
Sorting the addressbook RUBY
Submitted 23 June 2008

We chose to represent the addressbook as an array because arrays have an associated order. Say that we want to change that order. Suppose, for instance, that we want to sort the array alphabecially. How do we do that?

Views: 155 Comments: 0
Printing the addressbook RUBY
Submitted 23 June 2008

Now we will learn how to do things with the address book. Especifically, we will learn how to print and how to sort the addressbook.

Views: 143 Comments: 0
Example: Addressbook RUBY
Submitted 23 June 2008

An addressbook is a fairly complex structure. It contains several contacts, and each one has an associated name, address and so on.

Views: 111 Comments: 0
Hashes In RUBY
Submitted 23 June 2008

Hashes are a generalization of arrays. Instead of only permitting integer indices, as in array[3], hashes allow any object to be used as an "index". So, you can write hash["name"]

Views: 161 Comments: 0
Iterators In RUBY
Submitted 23 June 2008

An iterator is a special kind of method. It is a method that lets you access items one at a time.

Views: 134 Comments: 0
What can ruby arrays do?
Submitted 23 June 2008

This is all very nice, but can I do anything cool with arrays? You sure can. Follow this tutorial and ou will find out how.

Views: 120 Comments: 0
Arrays In RUBY
Submitted 23 June 2008

You are already familiar with a couple of Ruby classes (Integer and String). The class Array is used to represent a collection of items.

Views: 103 Comments: 0
More features IN RUBY
Submitted 23 June 2008

There are just a couple more things that we should do with our AddressBook class.

Views: 125 Comments: 0
Writing iterators In RUBY
Submitted 23 June 2008

In this section we are going to add our very own iterators to the class AddressBook. We will create two iterators, AddressBook#each and AddressBook#each_address, which can be used as usual:

Views: 208 Comments: 0
Implementing AddressBook In RUBY
Submitted 23 June 2008

he first step is very simple. AddressBook has an array which contains all our contacts. We will not use attr_accessor because we don't want the user to access this array directly. We will write our own access methods.

Views: 83 Comments: 0
Classes and methods in RUBY
Submitted 23 June 2008

Now we are ready to create our very own Address class. Let's start simple. Let's start with an address that only contains the "street" field.

Views: 105 Comments: 0