Class: FactoryGirl::Proxy::Build
- Inherits:
-
FactoryGirl::Proxy
- Object
- FactoryGirl::Proxy
- FactoryGirl::Proxy::Build
- Defined in:
- lib/factory_girl/proxy/build.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from FactoryGirl::Proxy
Instance Method Details
#association(factory_name, overrides = {}) ⇒ Object
4 5 6 7 |
# File 'lib/factory_girl/proxy/build.rb', line 4 def association(factory_name, overrides = {}) factory = FactoryGirl.factory_by_name(factory_name) factory.run(get_method(overrides[:method]), overrides.except(:method)) end |
#result(attribute_assigner, to_create) ⇒ Object
9 10 11 12 13 |
# File 'lib/factory_girl/proxy/build.rb', line 9 def result(attribute_assigner, to_create) attribute_assigner.object.tap do |result_instance| run_callbacks(:after_build, result_instance) end end |