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
-
#initialize(name, sequence, ignored) ⇒ Sequence
constructor
A new instance of Sequence.
- #to_proc(proxy) ⇒ Object
Methods inherited from FactoryGirl::Attribute
#add_to, #alias_for?, #association?
Constructor Details
#initialize(name, sequence, ignored) ⇒ Sequence
Returns a new instance of Sequence.
5 6 7 8 |
# File 'lib/factory_girl/attribute/sequence.rb', line 5 def initialize(name, sequence, ignored) super(name, ignored) @sequence = sequence end |
Instance Method Details
#to_proc(proxy) ⇒ Object
10 11 12 13 |
# File 'lib/factory_girl/attribute/sequence.rb', line 10 def to_proc(proxy) sequence = @sequence lambda { FactoryGirl.generate(sequence) } end |