Method: FactoryBot::Evaluator#initialize

Defined in:
lib/factory_bot/evaluator.rb

#initialize(build_strategy, overrides = {}) ⇒ Evaluator

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Evaluator.



13
14
15
16
17
18
19
20
21
22
# File 'lib/factory_bot/evaluator.rb', line 13

def initialize(build_strategy, overrides = {})
  @build_strategy = build_strategy
  @overrides = overrides
  @cached_attributes = overrides
  @instance = nil

  @overrides.each do |name, value|
    singleton_class.define_attribute(name) { value }
  end
end