---
title: 'Ruby Science: Dependency Injection, Inlining Classes, and DRY'
teaser:
tags: web,ruby
author: Joe Ferris
published_on: 2013-03-29
---

We just pushed the latest update to [Ruby Science](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters),
including three new chapters.

New chapters this week discuss:

* Using dependency injection to make changes easier and keep decisions close to
  the objects they affect.
* Inlining classes that no longer pull their own weight to improve readability
  and simplify dependencies.
* Our first principle chapter, which discusses <abbr title="Don't Repeat
  Yourself">DRY</abbr>, including smells and solutions related to detecting and
  eliminating duplication.

The book is a work in progress, and currently contains around 158 pages of
content. Your purchase gets you access to the current release of the book, all
future updates, and the companion example application. In addition, purchasers
can send thoughtbot their toughest Ruby, Rails, and refactoring questions.

[Get your copy of Ruby Science today](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters).
