Class: FactoryBot::Attribute::Sequence Private
- Inherits:
-
FactoryBot::Attribute
- Object
- FactoryBot::Attribute
- FactoryBot::Attribute::Sequence
- Defined in:
- lib/factory_bot/attribute/sequence.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from FactoryBot::Attribute
Instance Method Summary collapse
-
#initialize(name, sequence, ignored) ⇒ Sequence
constructor
private
A new instance of Sequence.
- #to_proc ⇒ Object private
Methods inherited from FactoryBot::Attribute
Constructor Details
#initialize(name, sequence, ignored) ⇒ Sequence
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Sequence.
5 6 7 8 |
# File 'lib/factory_bot/attribute/sequence.rb', line 5 def initialize(name, sequence, ignored) super(name, ignored) @sequence = sequence end |
Instance Method Details
#to_proc ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
10 11 12 13 |
# File 'lib/factory_bot/attribute/sequence.rb', line 10 def to_proc sequence = @sequence -> { FactoryBot.generate(sequence) } end |