module FakerMaker::LifecycleHooks::DefinitionProxy
Lifecycle hooks which can be called during the building of an instance
Public Instance Methods
after_build() { |instance, self| ... }
click to toggle source
# File lib/faker_maker/lifecycle_hooks.rb, line 11 def after_build(&block) @factory.define_singleton_method(:after_build) { yield(self.instance, self) } end
before_build() { |instance, self| ... }
click to toggle source
# File lib/faker_maker/lifecycle_hooks.rb, line 7 def before_build(&block) @factory.define_singleton_method(:before_build) { yield(self.instance, self) } end