class FactoryBot::CallbacksObserver
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/factory_bot/callbacks_observer.rbs class FactoryBot::CallbacksObserver def callbacks_by_name: (Symbol name) -> untyped def initialize: (Array[] callbacks, #<Class:0x0000000114673e90> evaluator) -> void def update: (Symbol name, (Types::Sample | Client) result_instance) -> untyped end
@api private
def callbacks_by_name(name)
Experimental RBS support (using type sampling data from the type_fusion
project).
def callbacks_by_name: (Symbol name) -> untyped
This signature was generated using 3 samples from 1 application.
def callbacks_by_name(name) @callbacks.select { |callback| callback.name == name } end
def initialize(callbacks, evaluator)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: ( callbacks, #<Class:0x0000000114673e90> evaluator) -> void
This signature was generated using 1 sample from 1 application.
def initialize(callbacks, evaluator) @callbacks = callbacks @evaluator = evaluator end
def update(name, result_instance)
Experimental RBS support (using type sampling data from the type_fusion
project).
def update: (Symbol name, (Types::Sample | Client) result_instance) -> untyped
This signature was generated using 11 samples from 2 applications.
def update(name, result_instance) callbacks_by_name(name).each do |callback| callback.run(result_instance, @evaluator) end end