Module: Lab42::Options::ArrayHelpers
- Defined in:
- lib/lab42/options/array_helpers.rb
Instance Method Summary collapse
Instance Method Details
#counts ⇒ Object
8 9 10 |
# File 'lib/lab42/options/array_helpers.rb', line 8 def counts group_by(&Identity).map_values(&:size) end |
#flag_count ⇒ Object
12 13 14 |
# File 'lib/lab42/options/array_helpers.rb', line 12 def flag_count count{|x| x==true} end |