Module: Enumerable
- Included in:
- Trax::Core::FS::CurrentFileDirectory, Trax::Core::FS::CurrentWorkingDirectory, Trax::Core::FS::Files, Trax::Core::Fields
- Defined in:
- lib/trax/core/ext/enumerable.rb
Instance Method Summary collapse
Instance Method Details
#group_by_count ⇒ Object
2 3 4 |
# File 'lib/trax/core/ext/enumerable.rb', line 2 def group_by_count ::Hash.new(0).tap{|hash| each{|item| hash[item] += 1 } } end |