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
68 69 70 |
# File 'lib/factory_girl/syntax/default.rb', line 68 def self.run(block) new.instance_eval(&block) end |
Instance Method Details
#factory(name, options = {}, &block) ⇒ Object
62 63 64 65 66 |
# File 'lib/factory_girl/syntax/default.rb', line 62 def factory(name, = {}, &block) factory = FactoryGirl.factory_by_name(name) proxy = FactoryGirl::DefinitionProxy.new(factory.definition.overridable) proxy.instance_eval(&block) end |