Class: FactoryGirl::Syntax::Default::ModifyDSL
- Inherits:
-
Object
- Object
- FactoryGirl::Syntax::Default::ModifyDSL
- Defined in:
- lib/factory_girl/syntax/default.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(block) ⇒ Object
41 42 43 |
# File 'lib/factory_girl/syntax/default.rb', line 41 def self.run(block) new.instance_eval(&block) end |
Instance Method Details
#factory(name, options = {}, &block) ⇒ Object
45 46 47 48 49 |
# File 'lib/factory_girl/syntax/default.rb', line 45 def factory(name, = {}, &block) factory = FactoryGirl.factory_by_name(name) proxy = FactoryGirl::DefinitionProxy.new(factory.definition.overridable) proxy.instance_eval(&block) end |