 |
| |
| by: rae - 2008-06-08 08:30:15 |
|
| | What are methods and how to use them in Ruby? |
|
| |
|  |
 |
| |
| by: rae - 2008-05-16 13:46:08 |
|
| | A brief introduction to arrays in Ruby. |
|
| |
|  |
 |
| |
| |
| | Ruby, those that have tried it say it makes programming fun again (myself included), the creator says it takes the best bits of perl, smalltalk, and python to create a portable true oo language. |
|
| |
|  |
 |
| |
| |
| | Today I’m going to go through arrays, control, blocks, iterators and handling input. |
|
| |
|  |
 |
| |
| |
| | Regex, or regular expressions, are a way to define patterns to be compared against a string. They can be a bit of a stumbling block for some, in fact entire books have been written on the subject. |
|
| |
|  |
 |
| |
| |
| | In keeping with the general theme of ruby, its array/hash handling (and infact, data structures in general) is simple, easy to use, whilst being powerful enough to get the job done. |
|
| |
|  |
 |
| |
| |
| | Had a few requests to release the code for this, so here it is, a 50 line (ok 49, but 50 sounds better) ruby web server, whilst its hardly apache it does the job. |
|
| |
|  |
 |
| |
| |
| | The first thing you need to know is what eRuby is. eRuby is simply a way of embedding Ruby code inside an HTML document. It is used just like ASP, JSP, and PHP, but it gives you all the power of Ruby instead. There are several different implementations of eRuby, including eruby and erb. This tutorial is going to discuss eruby. |
|
| |
|  |
 |
| |
| |
| | Ruby's introspective nature, and its included SDBM string database library makes persistent applications a cake walk. |
|
| |
|  |
 |
| |
| |
| | This short tutorial is going to show you the basics of creating interfaces in Ruby by using the Tk graphics library. |
|
| |
|  |
 |
| |
| |
| | Closures are oddities of scope, that if used right can be an interesting, if not handy way of making a private relationship between 2 apparently unrelated objects, or allowing for retention of private data for any number of public procedures to use. |
|
| |
|  |
 |
| |
| |
| | I have never been great with sockets, infact I have never understood winsock at all, preferring to use MFCs CSocket which, obviously, whilst still ultimately winsock gives a higher level of abstraction, however I can honestly say sockets in ruby are a joy to work with. |
|
| |
|  |
 |
| |
| |
| | Ruby has a unique property that many popular languages do not have. Ruby can write code that has the sole purpose of affecting other code. By using the dynamic class definition features of Ruby you can save time and create very elegant code. |
|
| |
|  |
 |
| |
| |
| | There are many times when you need to put seemingly random data in order. Here I'll explain one of the algorithms for organizing that data, the Bubblesort algorithm. (This isn't just ruby, it can be ported to any language) |
|
| |
|  |
 |