lib/core/facets/enumerable.rb in facets-2.4.3 vs lib/core/facets/enumerable.rb in facets-2.4.4

- old
+ new

@@ -1,24 +1,6 @@ -require 'facets/enumerable/accumulate.rb' -require 'facets/enumerable/cluster_by.rb' -require 'facets/enumerable/collect.rb' -require 'facets/enumerable/commonality.rb' -require 'facets/enumerable/count.rb' -require 'facets/enumerable/divide.rb' -require 'facets/enumerable/duplicates.rb' -require 'facets/enumerable/each_by.rb' -require 'facets/enumerable/entropy.rb' -require 'facets/enumerable/frequency.rb' -require 'facets/enumerable/group_by.rb' -require 'facets/enumerable/inject.rb' -require 'facets/enumerable/map_send.rb' -require 'facets/enumerable/mash.rb' -require 'facets/enumerable/mode.rb' -require 'facets/enumerable/modulate.rb' -require 'facets/enumerable/probability.rb' -require 'facets/enumerable/none.rb' -require 'facets/enumerable/occur.rb' -require 'facets/enumerable/one.rb' -require 'facets/enumerable/split.rb' -require 'facets/enumerable/sum.rb' -require 'facets/enumerable/uniq_by.rb' +dir, base = *File.split(__FILE__) +base = base.chomp('.rb') +Dir[File.join(dir, base, '*')].each do |lib| + require "facets/#{base}/#{File.basename(lib)}" +end