Class: FactoryBot::Sequence::EnumeratorAdapter Private
- Inherits:
-
Object
- Object
- FactoryBot::Sequence::EnumeratorAdapter
- Defined in:
- lib/factory_bot/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 Method Summary collapse
-
#initialize(value) ⇒ EnumeratorAdapter
constructor
private
A new instance of EnumeratorAdapter.
- #next ⇒ Object private
- #peek ⇒ Object private
- #rewind ⇒ Object private
Constructor Details
#initialize(value) ⇒ EnumeratorAdapter
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 EnumeratorAdapter.
53 54 55 56 |
# File 'lib/factory_bot/sequence.rb', line 53 def initialize(value) @first_value = value @value = value end |
Instance Method Details
#next ⇒ 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.
62 63 64 |
# File 'lib/factory_bot/sequence.rb', line 62 def next @value = @value.next end |
#peek ⇒ 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.
58 59 60 |
# File 'lib/factory_bot/sequence.rb', line 58 def peek @value end |
#rewind ⇒ 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.
66 67 68 |
# File 'lib/factory_bot/sequence.rb', line 66 def rewind @value = @first_value end |