paulelliott/fabrication — pull request #113 by meredian (2012-07-03 12:20:41+00:00)
Title: Add initialize_with block for scheme definition

Hi. While using your gem I encountered problem - some instances should be generated not by klass.new, but using third-party factory, so I added recognition for block initialize_with, which allows to use custom code for initializing objects instead of calling "new" method. (FYI: this option is available in factory girl, but we switched to your gem for some reasons)

Also add proper fixes to make preset and overriden variables available in initialize_with block. We are already using this (monkeypatched :) ) code in production, hope you will find it usefull to.