Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/minitest/find_minimal_combination.rb
Instance Method Summary collapse
-
#find_minimal_combination(&test) ⇒ Object
Find the minimal combination of a collection of items that satisfy
test
. - #find_minimal_combination_and_count ⇒ Object
Instance Method Details
#find_minimal_combination(&test) ⇒ Object
Find the minimal combination of a collection of items that satisfy test
.
92 93 94 |
# File 'lib/minitest/find_minimal_combination.rb', line 92 def find_minimal_combination &test ComboFinder.new.find_minimal_combination(self, &test) end |
#find_minimal_combination_and_count ⇒ Object
96 97 98 99 100 101 102 103 104 105 |
# File 'lib/minitest/find_minimal_combination.rb', line 96 def find_minimal_combination_and_count count = 0 found = self.find_minimal_combination do |ary| count += 1 yield ary end return found, count end |