The Well-Grounded Rubyist, Third Edition
David A. Black, Joseph Leo
  • MEAP began November 2017
  • Publication in Summer 2018 (estimated)
  • ISBN 9781617295218
  • 575 pages (estimated)
  • printed in black & white

GET MORE WITH MANNING

An eBook copy of the previous edition, The Well-Grounded Rubyist, Second Edition, is included at no additional cost. It will be automatically added to your Manning Bookshelf within 24 hours of purchase.


The Well-Grounded Rubyist, Third Edition is a perfect tutorial for newcomers to Ruby and a great way for experienced Rubyists to deepen their understanding of the language. This thorough book starts with Ruby fundamentals and offers an in-depth guide to all major language features. In this newly-revised third edition covering Ruby 2.5, expert authors David A. Black and Joe Leo make even familiar concepts seem new and interesting.
Table of Contents detailed table of contents

Part 1: Ruby foundations

1. Bootstrapping your Ruby literacy

1.1. Basic Ruby language literacy

1.1.1. A Ruby syntax survival kit

1.1.2. The variety of Ruby identifiers

1.1.3. Method calls, messages, and Ruby objects

1.1.4. Writing and saving a simple program

1.1.5. Feeding the program to Ruby

1.1.6. Keyboard and file I/O

1.2. Anatomy of the Ruby installation

1.2.1. The Ruby standard library subdirectory (RbConfig::CONFIG[“rubylibdir”])

1.2.2. The C extensions directory (RbConfig::CONFIG[“archdir”])

1.2.3. The site_ruby (RbConfig::CONFIG[“sitedir”]) and vendor_ruby (RbConfig::CONFIG[“vendordir”]) directories

1.2.4. Standard Ruby gems and the gems directory

1.3. Ruby extensions and programming libraries

1.3.1. Loading external files and extensions

1.3.2. “Load”-ing a file in the default load path

1.3.3. “Require”-ing a feature

1.3.4. require_relative

1.4. Out-of-the-box Ruby tools and applications

1.4.1. Interpreter command-line switches

1.4.2. A closer look at interactive Ruby interpretation with irb

1.4.3. ri and RDoc

1.4.4. The rake task-management utility

1.4.5. Installing packages with the gem command

1.5. Summary

2. Objects, methods, and local variables

2.1. Talking to objects

2.1.1. Ruby and object orientation

2.1.2. Creating a generic object

2.1.3. Methods that take arguments

2.1.4. The return value of a method

2.2. Crafting an object: The behavior of a ticket

2.2.1. The ticket object, behavior first

2.2.2. Querying the ticket object

2.2.3. Shortening the ticket code via string interpolation

2.2.4. Ticket availability: Expressing Boolean state in a method

2.3. The innate behaviors of an object

2.3.1. Identifying objects uniquely with the object_id method

2.3.2. Querying an object’s abilities with the respond_to? method

2.3.3. Sending messages to objects with the send method

2.4. A close look at method arguments

2.4.1. Required and optional arguments

2.4.2. Default values for arguments

2.4.3. Order of parameters and arguments

2.4.4. What you can’t do in argument lists

2.5. Local variables and variable assignment

2.5.1. Variables, objects, and references

2.5.2. References in variable assignment and reassignment

2.5.3. References and method arguments

2.5.4. Local variables and the things that look like them

2.6. Summary

3. Organizing objects with classes

3.1. Classes and instances

3.1.1. Instance methods

3.1.2. Overriding methods

3.1.3. Reopening classes

3.2. Instance variables and object state

3.2.1. Initializing an object with state

3.3. Setter methods

3.3.1. The equal sign (=) in method names

3.3.2. Syntactic sugar for assignment-like methods

3.3.3. Setter methods unleashed

3.4. Attributes and the attr_* method family

3.4.1. Automating the creation of attributes

3.4.2. Summary of attr_* methods

3.5. Inheritance and the Ruby class hierarchy

3.5.1. Single inheritance: One to a customer

3.6. Classes as objects and message receivers

3.6.1. Creating class objects

3.6.2. How class objects call methods

3.6.3. A singleton method by any other name…​

3.6.4. When, and why, to write a class method

3.6.5. Class methods vs. instance methods

3.7. Constants up close

3.7.1. Basic use of constants

3.7.2. Reassigning vs. modifying constants

3.8. Nature vs. nurture in Ruby objects

3.9. Summary

4. Modules and program organization

5. The default object (self), scope, and visibility

6. Control-flow techniques

Part 2: Built-in classes and modules

7. Built-in essentials

8. Strings, symbols, and other scalar objects

9. Collection and container objects

10. Collections central: Enumerable and Enumerator

11. Regular expressions and regexp-based string operations

12. File and I/O operations

Part 3: Ruby dynamics

13. Object individuation

14. Callable and runnable objects

15. Callbacks, hooks, and runtime introspection

16. Ruby and Functional Programming

About the Technology

Ruby is a dynamic language perfect for creating applications, development tools, and administrative scripts. Because it's the backbone of the well-loved Ruby on Rails web framework, Ruby has become one of the most popular programming languages in the world. This elegant language boasts a friendly development community, countless libraries, and amazing productivity tools. Isn't it time you discovered the benefits of being a well-grounded Rubyist?

About the book

The Well-Grounded Rubyist, Third Edition is a beautifully written tutorial that begins with your first Ruby program and takes you all the way to sophisticated topics like reflection, threading, and recursion. Ruby masters David A. Black and Joe Leo distill their years of knowledge for you, concentrating on the language and its uses so you can use Ruby in any way you choose. This Third Edition includes coverage of the latest Ruby features such as the safe navigation operator, method currying, writing side effect-free code, and recursion.

What's inside

  • Fully updated to cover the latest in Ruby 2.5
  • Clear explanations of Ruby concepts and how to apply them
  • Simple examples to seal in the learning
  • Prepares you to use Ruby anywhere for any purpose

About the reader

This book teaches Ruby from the ground up. The reader should have command of basic programming concepts in another language.

About the authors

David A. Black is an internationally-known Ruby developer, author, trainer, speaker, and event organizer, as well as a co-founder of Ruby Central. Joseph Leo III is a Ruby teacher, mentor, and community advocate. He is the lead organizer of the Gotham Ruby Conference (GoRuCo) and founder of Def Method.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks