Programming Ruby: The Pragmatic Programmers' Guide (Second Edition)
A comprehensive reference and tutorial for the Ruby programming language, covering basic syntax, object-oriented design, advanced features like reflection and threading, and a complete library reference for version 1.8.
Course Overview
Content Summary
A comprehensive reference and tutorial for the Ruby programming language, covering basic syntax, object-oriented design, advanced features like reflection and threading, and a complete library reference for version 1.8.
Master the art of elegant and powerful programming with the definitive guide to the Ruby language.
Author: Dave Thomas, Chad Fowler, Andy Hunt
Acknowledgments: Reviewers from the Ruby mailing list, Yukihiro Matsumoto (Matz), Chad Fowler, Kim Wimpsett, and the Pragmatic Programmers community.
Learning Objectives
- Install and configure the Ruby environment using various methods (binary, source, or CVS) and utilize interactive tools like irb and ri.
- Apply Ruby’s naming conventions and object-oriented principles to define methods and manage variables.
- Manipulate data using basic arrays, hashes, and regular expressions.
- Define and implement class hierarchies using single inheritance, super, and mixins.
- Control object visibility and data integrity using Access Control (Public, Private, Protected) and Attributes.
- Construct robust container classes (e.g., SongList) integrated with Unit Testing.
- Implement numeric logic using various bases (hex, octal, binary) and utilize numeric iterators for control flow.
- Construct complex strings using interpolation, heredocs, and various delimiter formats.
- Apply Ranges as "toggle switches" in conditional logic and as interval testers.
- Define and invoke methods using flexible argument lists (splat operator), hash-based "keyword" arguments, and block-to-proc conversions.