Video description
"Once again, the definitive book on Ruby from David Black. A must-have!"
William Wheeler, TekSystems
The Well-Grounded Rubyist, Second Edition addresses both newcomers to Ruby as well as Ruby programmers who want to deepen their understanding of the language. This beautifully written tutorial begins with your first Ruby program and goes on to explore sophisticated topics like callable objects, reflection, and threading. It concentrates on the language, preparing you to use Ruby in any way you choose. This edition includes coverage of Ruby features such as keyword arguments, lazy enumerators, and Module#prepend.
This is a good time for Ruby! It's powerful like Java or C++, and has dynamic features that let your code react gracefully to changes at runtime. And it's elegant, so creating applications, development tools, and administrative scripts is easier and more straightforward. With an active development community and countless libraries and productivity tools, Ruby has come into its own.
Inside:
- Clear explanations of Ruby concepts
- Numerous simple examples
- Updated for Ruby 2.1
- Prepares you to use Ruby anywhere for any purpose
David A. Black is an internationally known Ruby developer, author, trainer, speaker, event organizer, and founder of Ruby Central, as well as a Lead Consultant at Cyrus Innovation.
All wheat, no chaff—takes you from Ruby programmer to full-fledged Rubyist.
Doug Sparling, Andrews McMeel Universal
Provides powerful insights and digs into Ruby’s quirks. Revelatory.
Ted Roche, Ted Roche & Associates, LLC
The best way to learn Ruby fundamentals.
Derek Sivers, sivers.org
NARRATED BY MARK THOMAS
Table of Contents
PART 1 RUBY FOUNDATIONS
Chapter 1. Bootstrapping your Ruby literacy
Chapter 1. The variety of Ruby identifiers
Chapter 1. Method calls, messages, and Ruby objects
Chapter 1. Writing and saving a simple program
Chapter 1. Anatomy of the Ruby installation
Chapter 1. Ruby extensions and programming libraries
Chapter 1. Out-of-the-box Ruby tools and applications
Chapter 1. A closer look at interactive Ruby interpretation with irb
Chapter 1. The rake task-management utility
Chapter 2. Objects, methods, and local variables
Chapter 2. Creating a generic object
Chapter 2. Crafting an object: The behavior of a ticket
Chapter 2. The innate behaviors of an object
Chapter 2. A close look at method arguments
Chapter 2. Order of parameters and arguments
Chapter 2. Local variables and variable assignment
Chapter 2. References in variable assignment and reassignment
Chapter 2. Local variables and the things that look like them
Chapter 3. Organizing objects with classes
Chapter 3. Overriding methods
Chapter 3. Instance variables and object state
Chapter 3. Setter methods
Chapter 3. Attributes and the attr_* method family
Chapter 3. Inheritance and the Ruby class hierarchy
Chapter 3. Classes as objects and message receivers
Chapter 3. A singleton method by any other name…
Chapter 3. Constants up close
Chapter 3. Nature vs. nurture in Ruby objects
Chapter 4. Modules and program organization
Chapter 4. A module encapsulating “stacklikeness”
Chapter 4. Mixing a module into a class
Chapter 4. Modules, classes, and method lookup
Chapter 4. Defining the same method more than once
Chapter 4. The rules of method lookup summarized
Chapter 4. The method_missing method
Chapter 4. Class/module design and naming
Chapter 5. The default object (self), scope, and visibility
Chapter 5. Self inside class, module, and method definitions
Chapter 5. Self as the default receiver of messages
Chapter 5. Determining scope
Chapter 5. Local scope
Chapter 5. Scope and resolution of constants
Chapter 5. Class variable syntax, scope, and visibility
Chapter 5. Class variables and the class hierarchy
Chapter 5. Deploying method-access rules
Chapter 5. Writing and using top-level methods
Chapter 6. Control-flow techniques
Chapter 6. Assignment syntax in condition bodies and tests
Chapter 6. case statements
Chapter 6. Repeating actions with loops
Chapter 6. Iterators and code blocks
Chapter 6. Curly braces vs. do/end in code block syntax
Chapter 6. The importance of being each
Chapter 6. Block parameters and variable scope
Chapter 6. Error handling and exceptions
Chapter 6. Capturing an exception in a rescue clause
PART 2 BUILT-IN CLASSES AND MODULES
Chapter 7. Built-in essentials
Chapter 7. Recurrent syntactic sugar
Chapter 7. Bang (!) methods and “danger”
Chapter 7. Built-in and custom to_* (conversion) methods
Chapter 7. Numerical conversion with to_i and to_f
Chapter 7. Boolean states, Boolean objects, and nil
Chapter 7. Comparing two objects
Chapter 7. Inspecting object capabilities
Chapter 8. Strings, symbols, and other scalar objects
Chapter 8. Basic string manipulation
Chapter 8. Querying strings
Chapter 8. String transformation
Chapter 8. String encoding: A brief introduction
Chapter 8. Symbols and their uses
Chapter 8. Symbols in practice
Chapter 8. Numerical objects
Chapter 8. Times and dates
Chapter 8. Date/time formatting methods
Chapter 9. Collection and container objects
Chapter 9. Collection handling with arrays
Chapter 9. Inserting, retrieving, and removing array elements
Chapter 9. Combining arrays with other arrays
Chapter 9. Hashes
Chapter 9. Specifying default hash values and behavior
Chapter 9. Hash querying
Chapter 9. Ranges
Chapter 9. Sets
Chapter 10. Collections central: Enumerable and Enumerator
Chapter 10. Enumerable Boolean queries
Chapter 10. Enumerable searching and selecting
Chapter 10. Selecting on threequal matches with grep
Chapter 10. Element-wise enumerable operations
Chapter 10. Relatives of each
Chapter 10. The map method
Chapter 10. Strings as quasi-enumerables
Chapter 10. Where the Comparable module fits into enumerable sorting (or doesn’t)
Chapter 10. Enumerators and the next dimension of enumerability
Chapter 10. Attaching enumerators to other objects
Chapter 10. Enumerator semantics and uses
Chapter 10. Fine-grained iteration with enumerators
Chapter 10. Enumerator method chaining
Chapter 10. Exclusive-or operations on strings with enumerators
Chapter 10. Lazy enumerators
Chapter 11. Regular expressions and regexp-based string operations
Chapter 11. Building a pattern in a regular expression
Chapter 11. Matching, substring captures, and MatchData
Chapter 11. Two ways of getting the captures
Chapter 11. Fine-tuning regular expressions with quantifiers, anchors, and modifiers
Chapter 11. Greedy (and non-greedy) quantifiers
Chapter 11. Regular expression anchors and assertions
Chapter 11. Converting strings and regular expressions to each other
Chapter 11. Common methods that use regular expressions
Chapter 11. Case equality and grep
Chapter 12. File and I/O operations
Chapter 12. STDIN, STDOUT, STDERR
Chapter 12. Basic file operations
Chapter 12. Reading files with File class methods
Chapter 12. Querying IO and File objects
Chapter 12. Directory manipulation with the Dir class
Chapter 12. File tools from the standard library
Chapter 12. The StringIO class
PART 3 RUBY DINAMICS
Chapter 13. Object individuation
Chapter 13. Examining and modifying a singleton class directly
Chapter 13. Singleton classes on the method-lookup path
Chapter 13. The singleton_class method
Chapter 13. Modifying Ruby’s core classes and modules
Chapter 13. The risks of changing core functionality
Chapter 13. Additive changes
Chapter 13. Per-object changes with extend
Chapter 13. BasicObject as ancestor and class
Chapter 14. Callable and runnable objects
Chapter 14. Procs and blocks and how they differ
Chapter 14. Using Symbol#to_proc for conciseness
Chapter 14. Creating functions with lambda and ->
Chapter 14. The eval family of methods
Chapter 14. The instance_eval method
Chapter 14. Parallel execution with threads
Chapter 14. Writing a chat server using sockets and threads
Chapter 14. Manipulating thread keys
Chapter 14. Issuing system commands from inside Ruby programs
Chapter 14. Summary
Chapter 15. Callbacks, hooks, and runtime introspection
Chapter 15. Intercepting unrecognized messages with method_missing
Chapter 15. Trapping include and prepend operations
Chapter 15. The Module#const_missing method
Chapter 15. Interpreting object capability queries
Chapter 15. Getting class and module instance methods
Chapter 15. Introspection of variables and constants
Chapter 15. Tracing execution
Chapter 15. Callbacks and method inspection in practice
Chapter 15. Specifying and implementing MicroTest