Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/andy_convenience.rb
Instance Method Summary collapse
Instance Method Details
#/(n) ⇒ Object
106 107 108 |
# File 'lib/andy_convenience.rb', line 106 def /(n) self.each_slice(n).to_a end |
#max_count ⇒ Object
110 111 112 |
# File 'lib/andy_convenience.rb', line 110 def max_count self.group_by{|i| self.count(i)}.max_by {|k, v| k}.last.uniq end |