Class: FactoryGirl::Attribute::Sequence
- Inherits:
-
FactoryGirl::Attribute
- Object
- FactoryGirl::Attribute
- FactoryGirl::Attribute::Sequence
- Defined in:
- lib/factory_girl/attribute/sequence.rb
Instance Attribute Summary
Attributes inherited from FactoryGirl::Attribute
Instance Method Summary collapse
- #add_to(proxy) ⇒ Object
-
#initialize(name, sequence) ⇒ Sequence
constructor
A new instance of Sequence.
Methods inherited from FactoryGirl::Attribute
Constructor Details
#initialize(name, sequence) ⇒ Sequence
Returns a new instance of Sequence.
5 6 7 8 |
# File 'lib/factory_girl/attribute/sequence.rb', line 5 def initialize(name, sequence) super(name) @sequence = sequence end |
Instance Method Details
#add_to(proxy) ⇒ Object
10 11 12 |
# File 'lib/factory_girl/attribute/sequence.rb', line 10 def add_to(proxy) proxy.set(name, FactoryGirl.generate(@sequence)) end |