Module: FactoryGirl::Syntax::Blueprint::MongoMapper::ClassMethods

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#blueprint(&block) ⇒ Object



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

def blueprint(&block)
  instance = Factory.new(name.underscore, :class => self)
  proxy = FactoryGirl::DefinitionProxy.new(instance)
  proxy.instance_eval(&block)
  FactoryGirl.register_factory(instance)
end