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
.
110 111 112 |
# File 'lib/minitest/find_minimal_combination.rb', line 110 def find_minimal_combination &test ComboFinder.new.find_minimal_combination(self, &test) end |
#find_minimal_combination_and_count ⇒ Object
114 115 116 117 118 119 120 121 122 123 |
# File 'lib/minitest/find_minimal_combination.rb', line 114 def find_minimal_combination_and_count count = 0 found = self.find_minimal_combination do |ary| count += 1 yield ary end return found, count end |