For more than a decade, Ruby developers have turned to The Ruby Way for reliable “how-to” guidance on effective Ruby programming. Now, Hal Fulton and André Arko have thoroughly updated this classic guide to cover new language enhancements and developers’ experiences through Ruby 2.1.
The new edition illuminates Ruby 2.1 through 400+ examples, each answering the question: “How do I do this in Ruby?” For each example, they present both a task description and realistic technical constraints. Next, they walk step-by-step through presenting one good solution, offering detailed explanations to promote deeper understanding.
Conveniently organized by topic, The Ruby Way, Third Edition makes it easier than ever to find the specific solution you want—and to write better code by reflecting Ruby’s unique philosophy and spirit.
Coverage includesRuby 2.1 overview: terminology, philosophy, and basic principlesBest practices for strings and regular expressionsEfficiently internationalizing your codePerforming calculations (including trigonometry, calculus, statistics, and time/date calculations)Working with “Rubyesque” objects such as symbols and rangesUsing arrays, hashes, stacks, queues, trees, graphs, and other data structuresEfficiently storing data with YAML, JSON, and SQLite3Leveraging object-oriented and dynamic features, from multiple constructors to program inspectionBuilding GUIs with Shoes 4, Ruby/Tk, Ruby/GTK3, QtRuby, and other toolkitsImproving thread performance by understanding Ruby’s synchronization methods and avoiding its pitfallsAutomating system administration with RubyData formats: JSON, XML, RSS, Atom, RMagick, PDF, and moreTesting and debugging with RSpec, Minitest, Cucumber, byebug, and pryMeasuring Ruby program performancePackaging and distributing code, and managing dependencies with BundlerNetwork programming: clients, time servers, POP, SMTP, IMAP, Open-URIWeb applications: HTTP servers, Rails, Sinatra, HTML generation, and moreWriting distributed Ruby software with drbChoosing modern development tools that maximize your productivity
All source code for this book may be downloaded at www.rubyhacker.com.