Class: Properb::Generator
- Inherits:
-
Object
- Object
- Properb::Generator
show all
- Defined in:
- lib/properb/generator.rb
Direct Known Subclasses
Properb::Generators::ArrayGenerator, Properb::Generators::ChoiceGenerator, Properb::Generators::ConstantGenerator, Properb::Generators::DeferredGenerator, Properb::Generators::FrequenciesGenerator, Properb::Generators::IntegerGenerator, Properb::Generators::MappedGenerator, Properb::Generators::RecursiveGenerator, Properb::Generators::SelectedGenerator, Properb::Generators::SizedGenerator, Properb::Generators::TupleGenerator
Instance Method Summary
collapse
Instance Method Details
#reject(num_attempts: 10, &block) ⇒ Object
15
16
17
18
19
|
# File 'lib/properb/generator.rb', line 15
def reject(num_attempts: 10, &block)
select(num_attempts: num_attempts) do |*args|
!block.call(*args)
end
end
|
#select(num_attempts: 10, &block) ⇒ Object
11
12
13
|
# File 'lib/properb/generator.rb', line 11
def select(num_attempts: 10, &block)
Generators::SelectedGenerator.new(self, num_attempts: num_attempts, &block)
end
|
#to_properb_generator ⇒ Object
3
4
5
|
# File 'lib/properb/generator.rb', line 3
def to_properb_generator
self
end
|