Ruby Programming

Ruby was named after the precious gem.

Ruby is an interpreted, object-oriented programming language. Its creator, Yukihiro Matsumoto, a.k.a “Matz,” released it to the public in 1995. Its history is covered here. Its many features are listed here.

The book is currently broken down into several sections and is intended to be read sequentially. Getting started will show how to install and get started with Ruby in your environment. Basic Ruby demonstrates the main features of the language syntax. The Ruby language section is organized like a reference to the language. Available modules covers some of the standard library. Intermediate Ruby covers a selection of slightly more advanced topics. Each section is designed to be self contained.

Table of Contents

Getting started

Overview
Installing Ruby
Ruby editors
Notation conventions
Interactive Ruby
Mailing List FAQ

Basic Ruby

Hello world
Strings
Alternate quotes
Here documents
ASCII
Encoding
Introduction to objects
Ruby basics
Data types — numbers, strings, hashes and arrays
Writing methods
Classes and objects
Exceptions

Ruby Semantic reference

See also some rdoc documentation on the various keywords.

Built in Classes

This is a list of classes that are available to you by default in Ruby. They are pre-defined in “core.”

Available Standard Library Modules

These are parts of Ruby that you have available (in the standard library, or via installation as a gem). To use them you typically have to require some filename, for example require 'tracer' would make accessible to you the Tracer class.

You can see a list of basically all the (std lib ruby) modules available in the ruby source and lib readme. There are a several more modules available in the std lib, which are C based extensions. You can see their list here.

Other Libraries

GUI Libraries

Here is info on some specifically:

Intermediate Ruby

Here are some more in depth tutorials of certain aspects of Ruby.

Unit testing
RubyDoc
Rake
RubyGems
Running Multiple Processes
Using Network Sockets
Building C Extensions
Rails
Embedding Ruby within a separate C program

Documentation

Core Docs

gem docs

Learning Ruby

Books

Print
Online

Quick References

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.