Class: FactoryBot::Strategy::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_bot/strategy/build.rb

Instance Method Summary collapse

Instance Method Details

#association(runner) ⇒ Object



4
5
6
# File 'lib/factory_bot/strategy/build.rb', line 4

def association(runner)
  runner.run
end

#result(evaluation) ⇒ Object



8
9
10
11
12
# File 'lib/factory_bot/strategy/build.rb', line 8

def result(evaluation)
  evaluation.object.tap do |instance|
    evaluation.notify(:after_build, instance)
  end
end

#to_symObject



14
15
16
# File 'lib/factory_bot/strategy/build.rb', line 14

def to_sym
  :build
end