class FactoryBot::DefinitionProxy
def add_attribute(name, &block)
The name of this attribute. This will be assigned using "name=" for
* name: +Symbol+ or +String+
Arguments:
attribute is overridden for a specific instance.
The block will not be called if the
by calling the block whenever an instance is generated.
The attribute value will be generated "lazily"
Adds an attribute to the factory.
def add_attribute(name, &block) declaration = Declaration::Dynamic.new(name, @ignore, block) @definition.declare_attribute(declaration) end