1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
thoughtbot--factory_bot/lib/factory_girl/attribute/callback.rb

16 lines
279 B
Ruby

module FactoryGirl
class Attribute #:nodoc:
class Callback < Attribute #:nodoc:
def initialize(name, block)
@name = name.to_sym
@block = block
end
def add_to(proxy)
proxy.add_callback(name, @block)
end
end
end
end