# File lib/factory_girl/callback.rb, line 7 def initialize(name, block) @name = name.to_sym @block = block check_name end
# File lib/factory_girl/callback.rb, line 21 def ==(other) name == other.name && block == other.block end
# File lib/factory_girl/callback.rb, line 13 def run(instance, proxy) case block.arity when 1 then block.call(instance) when 2 then block.call(instance, proxy) else block.call end end