Method: Pbt::Arbitrary::OneOfArbitrary#initialize
- Defined in:
- lib/pbt/arbitrary/one_of_arbitrary.rb
#initialize(choices) ⇒ OneOfArbitrary
Returns a new instance of OneOfArbitrary.
8 9 10 11 |
# File 'lib/pbt/arbitrary/one_of_arbitrary.rb', line 8 def initialize(choices) @choices = choices @idx_arb = IntegerArbitrary.new(0, choices.size - 1) end |