Class: FactoryGirl::CallbacksObserver Private

Inherits:
Object
  • Object
show all
Defined in:
lib/factory_girl/callbacks_observer.rb

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

Instance Method Summary (collapse)

Constructor Details

- (CallbacksObserver) initialize(callbacks, 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 CallbacksObserver



4
5
6
7
# File 'lib/factory_girl/callbacks_observer.rb', line 4

def initialize(callbacks, evaluator)
  @callbacks = callbacks
  @evaluator = evaluator
end

Instance Method Details

- (Object) update(name, result_instance)

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.



9
10
11
12
13
# File 'lib/factory_girl/callbacks_observer.rb', line 9

def update(name, result_instance)
  callbacks_by_name(name).each do |callback|
    callback.run(result_instance, @evaluator)
  end
end