mirror of
https://github.com/thoughtbot/factory_bot.git
synced 2022-11-09 11:43:51 -05:00
16 lines
279 B
Ruby
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
|