The Well-Grounded Rubyist, Third Edition

Book description

The Well-Grounded Rubyist, Third Editionis 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. Updated for Ruby 2.5.

About the Technology
Designed for developer productivity, Ruby is an easy-to-learn dynamic language perfect for creating virtually any kind of software. Its famously friendly development community, countless libraries, and amazing tools, like the Rails framework, have established it as the language of choice for high-profile companies, including GitHub, SlideShare, and Shopify. The future is bright for the well-grounded Rubyist!

About the Book
In The Well-Grounded Rubyist, Third Edition expert authors David A. Black and Joseph Leo deliver Ruby mastery in an easy-to-read, casual style. You'll lock in core principles as you write your first Ruby programs. Then, you'll progressively build up to topics like reflection, threading, and recursion, cementing your knowledge with high-value exercises to practice your skills along the way.

What's Inside
  • Basic Ruby syntax
  • Running Ruby extensions
  • FP concepts like currying, side-effect-free code, and recursion
  • Ruby 2.5 updates


About the Reader
For readers with beginner-level programming skills.

About the Authors
David A. Black is an internationally known Ruby developer and author, and a cofounder of Ruby Central. Ruby teacher and advocate Joseph Leo III is the founder of Def Method and lead organizer of the Gotham Ruby Conference.

Quotes
A deep and thorough dive into the Ruby programming language.
- Brian Daley, University of Connecticut

The authors' methodical and logical teaching will make you fall in love with Ruby. It has never looked this good!
- Pierre-Michel Ansel, 8x8

Concepts are introduced via examples—perfect for deep understanding. Highly recommended!
- Prabhuti Prakash, Atos India

The title says it all: this book provides you with a solid foundation for your Ruby programming before exploring advanced topics.
- Deshuang Tang, Broadcom

Table of contents

  1. Copyright
  2. Brief Table of Contents
  3. Table of Contents
  4. Praise for the Second Edition
  5. Preface
  6. Acknowledgments
  7. About this book
  8. About the authors
  9. About the cover illustration
  10. Part 1. Ruby foundations
    1. Chapter 1. Bootstrapping your Ruby literacy
      1. 1.1. Basic Ruby language literacy
      2. 1.2. Anatomy of the Ruby installation
      3. 1.3. Ruby extensions and programming libraries
      4. 1.4. Out-of-the-box Ruby tools and applications
      5. Summary
    2. Chapter 2. Objects, methods, and local variables
      1. 2.1. Talking to objects
      2. 2.2. Crafting an object: the behavior of a ticket
      3. 2.3. The innate behaviors of an object
      4. 2.4. A close look at method arguments
      5. 2.5. Local variables and variable assignment
      6. Summary
    3. Chapter 3. Organizing objects with classes
      1. 3.1. Classes and instances
      2. 3.2. Instance variables and object state
      3. 3.3. Setter methods
      4. 3.4. Attributes and the attr_* method family
      5. 3.5. Inheritance and the Ruby class hierarchy
      6. 3.6. Classes as objects and message receivers
      7. 3.7. Constants up close
      8. 3.8. Nature vs. nurture in Ruby objects
      9. Summary
    4. Chapter 4. Modules and program organization
      1. 4.1. Basics of module creation and use
      2. 4.2. Modules, classes, and method lookup
      3. 4.3. The method_missing method
      4. 4.4. Class/module design and naming
      5. Summary
    5. Chapter 5. The default object (self), scope, and visibility
      1. 5.1. Understanding self, the current/default object
      2. 5.2. Determining scope
      3. 5.3. Deploying method-access rules
      4. 5.4. Writing and using top-level methods
      5. Summary
    6. Chapter 6. Control-flow techniques
      1. 6.1. Conditional code execution
      2. 6.2. Repeating actions with loops
      3. 6.3. Iterators and code blocks
      4. 6.4. Error handling and exceptions
      5. Summary
  11. Part 2. Built-in classes and modules
    1. Chapter 7. Built-in essentials
      1. 7.1. Ruby’s literal constructors
      2. 7.2. Recurrent syntactic sugar
      3. 7.3. Bang (!) methods and “danger”
      4. 7.4. Built-in and custom to_* (conversion) methods
      5. 7.5. Boolean states, Boolean objects, and nil
      6. 7.6. Comparing two objects
      7. 7.7. Inspecting object capabilities
      8. Summary
    2. Chapter 8. Strings, symbols, and other scalar objects
      1. 8.1. Working with strings
      2. 8.2. Symbols and their uses
      3. 8.3. Numerical objects
      4. 8.4. Times and dates
      5. Summary
    3. Chapter 9. Collection and container objects
      1. 9.1. Arrays and hashes in comparison
      2. 9.2. Collection handling with arrays
      3. 9.3. Hashes
      4. 9.4. Ranges
      5. 9.5. Sets
      6. Summary
    4. Chapter 10. Collections central: Enumerable and Enumerator
      1. 10.1. Gaining enumerability through each
      2. 10.2. Enumerable Boolean queries
      3. 10.3. Enumerable searching and selecting
      4. 10.4. Element-wise enumerable operations
      5. 10.5. Relatives of each
      6. 10.6. The map method
      7. 10.7. Strings as quasi-enumerables
      8. 10.8. Sorting enumerables
      9. 10.9. Enumerators and the next dimension of enumerability
      10. 10.10. Enumerator semantics and uses
      11. 10.11. Enumerator method chaining
      12. 10.12. Lazy enumerators
      13. Summary
    5. Chapter 11. Regular expressions and regexp-based string operations
      1. 11.1. What are regular expressions?
      2. 11.2. Writing regular expressions
      3. 11.3. Building a pattern in a regular expression
      4. 11.4. Matching, substring captures, and MatchData
      5. 11.5. Fine-tuning regular expressions with quantifiers, anchors, and modifiers
      6. 11.6. Converting strings and regular expressions to each other
      7. 11.7. Common methods that use regular expressions
      8. Summary
    6. Chapter 12. File and I/O operations
      1. 12.1. How Ruby’s I/O system is put together
      2. 12.2. Basic file operations
      3. 12.3. Querying IO and File objects
      4. 12.4. Directory manipulation with the Dir class
      5. 12.5. File tools from the standard library
      6. Summary
  12. Part 3. Ruby dynamics
    1. Chapter 13. Object individuation
      1. 13.1. Where the singleton methods are: the singleton class
      2. 13.2. Modifying Ruby’s core classes and modules
      3. 13.3. BasicObject as ancestor and class
      4. Summary
    2. Chapter 14. Callable and runnable objects
      1. 14.1. Basic anonymous functions: the Proc class
      2. 14.2. Creating functions with lambda and ->
      3. 14.4. The eval family of methods
      4. 14.5. Concurrent execution with threads
      5. 14.6. Issuing system commands from inside Ruby programs
      6. Summary
    3. Chapter 15. Callbacks, hooks, and runtime introspection
      1. 15.1. Callbacks and hooks
      2. 15.2. Interpreting object capability queries
      3. 15.3. Introspection of variables and constants
      4. 15.4. Tracing execution
      5. 15.5. Callbacks and method inspection in practice
      6. Summary
    4. Chapter 16. Ruby and functional programming
      1. 16.1. Understanding pure functions
      2. 16.2. Immutability
      3. 16.3. Higher-order functions
      4. 16.4. Recursion
      5. Summary
  13. Index
  14. List of Figures
  15. List of Tables
  16. List of Listings

Product information

  • Title: The Well-Grounded Rubyist, Third Edition
  • Author(s): Joe Leo
  • Release date: March 2019
  • Publisher(s): Manning Publications
  • ISBN: 9781617295218