Module: ApiHeaderOptimizer::Helpers
- Defined in:
- lib/api_header_optimizer/helpers.rb
Class Method Summary collapse
-
.subsets(array) ⇒ Object
Dizinin tüm alt kümelerini döndüren metot.
Class Method Details
.subsets(array) ⇒ Object
Dizinin tüm alt kümelerini döndüren metot
4 5 6 |
# File 'lib/api_header_optimizer/helpers.rb', line 4 def self.subsets(array) (0..array.size).flat_map { |n| array.combination(n).to_a } end |