Free online book “Learning Ruby” by Daniel Carrera. The first chapter covers the fundamentals of writing a program. It is required knowledge for anyone aspiring to program in Ruby. The second chapter covers the fundamental concepts needed to perform any task.
Book Description
Whether it’s reacting to user input, or performing an action multiple times, this chapter is mandatory knowledge. Much of the strength of Ruby lies in its powerful data structures. The third chapter will give you the tools to create much more interesting programs than otherwise possible. You will learn how to easily express complex information such as an address book with fields like phone, email and mailing address. In the forth chapter, we will turn data structures into our very own classes, Address, Person and Addressbook, with their own methods.
Some times, you will want to create a nice-looking, easy-to-use interface for your programs. The fifth chapter introduces graphical user interfaces with the Tk toolkit.
This chapter is quite optional. It is only relevant if you wish to create GUIs using Tk. Should you use Tk? Well, I think so. I encourage you to read the section Why Tk?. There I compare Tk to other toolkits, and explain my reasons for choosing Tk.
This material is indispensable if you wish to create a program with moderately complex behaviour.
Table of Contents
- The Basics
- Flow Control
- Data structures
- Defining your own classes and methods
- Graphical User Interfaces (GUI) with Tk