Category Archives: Ruby

Modeling the World with Prototypes

This post started out as the second half of an article on prototype-based OO design for Gregory Brown’s Practicing Ruby. For an introduction to the prototyped view of the object world, and to follow along on an adventure in making … Continue reading

Posted in Design, Ruby | Tagged , , , | 10 Comments

RubyTapas 033: Classes and Constants

This week’s freebie episode is a brief exploration of what exactly happens when we define a class in Ruby. [http://www.youtube.com/watch?v=p61mk_O4Tw0]

Posted in Ruby, RubyTapas Samples, Screencasts | Leave a comment

RubyTapas 029 – Redirecting Output

Today’s Monday freebie takes a look at two different methods for redirecting standard out and standard error – one simple and quick, one more comprehensive.

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , , | Leave a comment

RubyTapas 027: Macros and Modules

In this episode themed after a certain sci-fi television series with the initials “BSG”, we take a look at how to use dynamically generated modules to make metaprogrammed methods open for future extension. This is a two-parter. In part two, (which … Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , , , | 6 Comments

RubyTapas 022: Inline Rescue

Sticking a rescue at the end of a line may seem expedient, but it has a tendency to bite you when you least expect it. In today’s freebie episode, I demonstrate how dangerous an inline rescue can be, as well … Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | Tagged , | 1 Comment

RubyTapas Episode 21: Domain Model Events

Today’s free Monday episode features a rare delving into Rails code. We take a look at a fat controller, and thin it down by identifying the model lifecycle events that are hiding inside it. This episode garnered a lot of … Continue reading

Posted in Rails, Ruby, RubyTapas Samples, Screencasts | 4 Comments

New RubyTapas Video, and a very special RubyConf Offer

A new video on Command-Query Separation, and a chance to lock-in a special discounted rate! Continue reading

Posted in Ruby, RubyTapas Samples, Screencasts | 4 Comments

RubyTapas Episode 13: Singleton Objects

Sometimes one instance is all you need.

Posted in Ruby, RubyTapas Samples, Screencasts, Videos | 3 Comments

RubyTapas Episode 10: Finding $HOME

Today’s free Monday episode of RubyTapas concerns how to reliably discover a user’s home directory.

Posted in Ruby, RubyTapas Samples, Screencasts, Videos | Leave a comment

RubyTapas Episode 7: Constructors

In today’s free Monday episode, a look into how Ruby constructs new objects, and how we can customize constructors for special scenarios.

Posted in Ruby, RubyTapas Samples, Screencasts, Videos | 6 Comments