Module: Factory::Syntax::Blueprint::ActiveRecord::ClassMethods

Defined in:
lib/factory_girl/syntax/blueprint.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#blueprint(&block) ⇒ Object



28
29
30
31
32
# File 'lib/factory_girl/syntax/blueprint.rb', line 28

def blueprint(&block)
  instance = Factory.new(name.underscore, :class => self)
  instance.instance_eval(&block)
  Factory.factories[instance.factory_name] = instance
end