Method: FactoryBot::Syntax::Methods#generate_list
- Defined in:
- lib/factory_bot/syntax/methods.rb
#generate_list(name, count) ⇒ Object
Generates and returns the list of values in a sequence.
Arguments:
name: (Symbol)
The name of the sequence that a value should be generated for.
count: (Fixnum)
Count of values
Returns:
The next value in the sequence. (Object)
127 128 129 130 131 |
# File 'lib/factory_bot/syntax/methods.rb', line 127 def generate_list(name, count) (1..count).map do Internal.sequence_by_name(name).next end end |