Closed pedroadame closed 6 years ago
It would be cool if you could pass it a range as well as just an integer. Any interest in making a PR?
Does this existing functionality work for your use case @pedroadame?
@pedroadame, as @jaysonvirissimo said, you can achieve that by:
children(:start_range => 42, :end_range => 69) { ... }
But I'm gonna open a PR with allowing to pass range to rand like this:
children(:rand => 42..69) { ... }
It's OK to have a parameter that randomizes count between 1 and N, but it could be great to have the possibility of specify a minimum other than one.