by Jim There’s an important difference between instance_eval and instance_exec. And there’s a great lesson about how to use them well in FactoryGirl But first, before you go rushing off to build your fantastic DSL, let’s look at what instance_eval is and does. The simplest of examples can be taken straight from the Ruby docs: class KlassWithSecret def initialize @secret = 99 end end k = KlassWithS