Class: Factory::Attribute::Callback
- Inherits:
-
Factory::Attribute
- Object
- Factory::Attribute
- Factory::Attribute::Callback
- Defined in:
- lib/factory_girl/attribute/callback.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Factory::Attribute
Instance Method Summary collapse
- #add_to(proxy) ⇒ Object
-
#initialize(name, block) ⇒ Callback
constructor
A new instance of Callback.
Constructor Details
#initialize(name, block) ⇒ Callback
Returns a new instance of Callback.
5 6 7 8 |
# File 'lib/factory_girl/attribute/callback.rb', line 5 def initialize(name, block) @name = name.to_sym @block = block end |
Instance Method Details
#add_to(proxy) ⇒ Object
10 11 12 |
# File 'lib/factory_girl/attribute/callback.rb', line 10 def add_to(proxy) proxy.add_callback(name, @block) end |