Book description
The Ruby Programming Language is the authoritative guide to Ruby and provides comprehensive coverage of versions 1.8 and 1.9 of the language. It was written (and illustrated!) by an all-star team:
- David Flanagan, bestselling author of programming language "bibles" (including JavaScript: The Definitive Guide and Java in a Nutshell) and committer to the Ruby Subversion repository.
- Yukihiro "Matz" Matsumoto, creator, designer and lead developer of Ruby and author of Ruby in a Nutshell, which has been expanded and revised to become this book.
- why the lucky stiff, artist and Ruby programmer extraordinaire.
The book also includes a long and thorough introduction to the rich API of the Ruby platform, demonstrating -- with heavily-commented example code -- Ruby's facilities for text processing, numeric manipulation, collections, input/output, networking, and concurrency. An entire chapter is devoted to Ruby's metaprogramming capabilities.
The Ruby Programming Language documents the Ruby language definitively but without the formality of a language specification. It is written for experienced programmers who are new to Ruby, and for current Ruby programmers who want to challenge their understanding and increase their mastery of the language.
Publisher resources
Table of contents
- The Ruby Programming Language
- A Note Regarding Supplemental Files
- Preface
- 1. Introduction
- 2. The Structure and Execution of Ruby Programs
-
3. Datatypes and Objects
- Numbers
- Text
- Arrays
- Hashes
- Ranges
- Symbols
- True, False, and Nil
- Objects
-
4. Expressions and Operators
- Literals and Keyword Literals
- Variable References
- Constant References
- Method Invocations
- Assignments
-
Operators
- Unary + and –
- Exponentiation: **
- Arithmetic: +, –, *, /, and %
- Shift and Append: << and >>
- Complement, Union, Intersection: ~, &, |, and ^
- Comparison: <, <=, >, >=, and <=>
- Equality: ==, !=, =~, !~, and ===
- Boolean Operators: &&, ||, !, and, or, not
- Ranges and Flip-Flops: .. and ...
- Conditional: ?:
- Assignment Operators
- The defined? Operator
- Statement Modifiers
- Nonoperators
-
5. Statements and Control Structures
- Conditionals
- Loops
- Iterators and Enumerable Objects
- Blocks
- Altering Control Flow
- Exceptions and Exception Handling
- BEGIN and END
- Threads, Fibers, and Continuations
- 6. Methods, Procs, Lambdas, and Closures
-
7. Classes and Modules
-
Defining a Simple Class
- Creating the Class
- Instantiating a Point
- Initializing a Point
- Defining a to_s Method
- Accessors and Attributes
- Defining Operators
- Array and Hash Access with [ ]
- Enumerating Coordinates
- Point Equality
- Ordering Points
- A Mutable Point
- Quick and Easy Mutable Classes
- A Class Method
- Constants
- Class Variables
- Class Instance Variables
- Method Visibility: Public, Protected, Private
- Subclassing and Inheritance
- Object Creation and Initialization
- Modules
- Loading and Requiring Modules
- Singleton Methods and the Eigenclass
- Method Lookup
- Constant Lookup
-
Defining a Simple Class
- 8. Reflection and Metaprogramming
-
9. The Ruby Platform
- Strings
- Regular Expressions
- Numbers and Math
- Dates and Times
- Collections
- Files and Directories
- Input/Output
- Networking
- Threads and Concurrency
- 10. The Ruby Environment
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: The Ruby Programming Language
- Author(s):
- Release date: January 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596516178
You might also like
book
Programming Ruby 3.3
Ruby is one of the most important programming languages in use for web development. It powers …
video
Learn to Code with Ruby
“Learn to Code with Ruby" is a meticulously crafted educational experience, designed to take you from …
book
Polished Ruby Programming
Elevate your Ruby skills to an advanced level by deepening your understanding of the design principles, …
book
Metaprogramming Ruby 2
Write powerful Ruby code that is easy to maintain and change. With metaprogramming, you can produce …